Added documentation for CRON

This commit is contained in:
Serghey Rodin 2011-12-26 13:24:02 +02:00
commit 260c303d84
10 changed files with 69 additions and 19 deletions

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: adding cron job
# info: add cron job
# arguments: user min hour day month wday command [job]
#
# The function adds a job to cron daemon. When executing commands, any output
# is mailed to user's email if parameter REPORTS is set to 'yes'.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,10 @@
#!/bin/bash
# info: changing cron job
# info: change cron job
# arguments: user job min hour day month wday command
#
# The function is used for changing existing job. It fully replace job
# parameters with new one but with same id.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: deleting sys cron
# info: delete cron job
# arguments: user job
#
# The function deletes cron job.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: listing user cron
# info: list user cron jobs
# arguments: user [format]
#
# The function for obtaining the list of all users cron jobs.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: rebuild cron job
# info: rebuild cron jobs
# arguments: user
#
# The function rebuilds system cron config file for specified user.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,23 +1,35 @@
#!/bin/bash
# Internal vesta function
# cron system restart
# info: restart cron service
# arguments: none
#
# The function tells crond service to reread its configuration files.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Importing variables
source $VESTA/conf/vars.conf
source $V_CONF/vesta.conf
crond() {
/etc/init.d/crond 'reload' >/dev/null 2>&1
if [ $? -ne 0 ]; then
#$V_FUNC/report_issue 'sys' 'cron'
echo "$E_RESTART_FAILED $V_EVENT"
fi
}
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Parsing config / or just source config
if [ "$CRON_SYSTEM" = 'crond' ]; then
crond
/etc/init.d/crond 'reload' >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$E_PARSING $V_EVENT"
exit $E_PARSING
fi
fi
# Logging
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Suspending sys cron
# info: suspend cron job
# arguments: user job
#
# The function suspends a certain job of the cron scheduler.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Suspending sys cron jobs
# arguments: user
#
# The function suspends all user cron jobs.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Unuspending sys cron
# info: unuspend cron job
# arguments: user job
#
# The function unsuspen certain cron job.
#----------------------------------------------------------#
# Variable&Function #

View file

@ -1,5 +1,9 @@
#!/bin/bash
# info: Unuspending sys cron
# info: unuspend sys cron
# arguments: user
#
# The function unsuspends all suspended cron jobs.
#----------------------------------------------------------#
# Variable&Function #