File tree Expand file tree Collapse file tree 10 files changed +69
-19
lines changed
Expand file tree Collapse file tree 10 files changed +69
-19
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: adding cron job
2+ # info: add cron job
3+ # arguments: user min hour day month wday command [job]
4+ #
5+ # The function adds a job to cron daemon. When executing commands, any output
6+ # is mailed to user's email if parameter REPORTS is set to 'yes'.
7+
38
49# ----------------------------------------------------------#
510# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: changing cron job
2+ # info: change cron job
3+ # arguments: user job min hour day month wday command
4+ #
5+ # The function is used for changing existing job. It fully replace job
6+ # parameters with new one but with same id.
7+
38
49# ----------------------------------------------------------#
510# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: deleting sys cron
2+ # info: delete cron job
3+ # arguments: user job
4+ #
5+ # The function deletes cron job.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: listing user cron
2+ # info: list user cron jobs
3+ # arguments: user [format]
4+ #
5+ # The function for obtaining the list of all users cron jobs.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: rebuild cron job
2+ # info: rebuild cron jobs
3+ # arguments: user
4+ #
5+ # The function rebuilds system cron config file for specified user.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # Internal vesta function
3- # cron system restart
2+ # info: restart cron service
3+ # arguments: none
4+ #
5+ # The function tells crond service to reread its configuration files.
6+
7+
8+ # ----------------------------------------------------------#
9+ # Variable&Function #
10+ # ----------------------------------------------------------#
411
512# Importing variables
613source $VESTA /conf/vars.conf
714source $V_CONF /vesta.conf
815
9- crond () {
10- /etc/init.d/crond ' reload' > /dev/null 2>&1
11- if [ $? -ne 0 ]; then
12- # $V_FUNC/report_issue 'sys' 'cron'
13- echo " $E_RESTART_FAILED $V_EVENT "
14- fi
15- }
16+
17+ # ----------------------------------------------------------#
18+ # Action #
19+ # ----------------------------------------------------------#
1620
1721# Parsing config / or just source config
1822if [ " $CRON_SYSTEM " = ' crond' ]; then
19- crond
23+ /etc/init.d/crond ' reload' > /dev/null 2>&1
24+ if [ $? -ne 0 ]; then
25+ echo " $E_PARSING $V_EVENT "
26+ exit $E_PARSING
27+ fi
2028fi
2129
22- # Logging
30+
31+ # ----------------------------------------------------------#
32+ # Vesta #
33+ # ----------------------------------------------------------#
34+
2335exit
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: Suspending sys cron
2+ # info: suspend cron job
3+ # arguments: user job
4+ #
5+ # The function suspends a certain job of the cron scheduler.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
22# info: Suspending sys cron jobs
3+ # arguments: user
4+ #
5+ # The function suspends all user cron jobs.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: Unuspending sys cron
2+ # info: unuspend cron job
3+ # arguments: user job
4+ #
5+ # The function unsuspen certain cron job.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: Unuspending sys cron
2+ # info: unuspend sys cron
3+ # arguments: user
4+ #
5+ # The function unsuspends all suspended cron jobs.
6+
37
48# ----------------------------------------------------------#
59# Variable&Function #
You can’t perform that action at this time.
0 commit comments