Added cron tab triggers. Issue #50

This commit is contained in:
Serghey Rodin 2012-02-20 17:04:25 +02:00
commit ba50b1c4c0
4 changed files with 10 additions and 4 deletions

View file

@ -46,6 +46,7 @@ is_job_suspended
# Suspending job # Suspending job
update_cron_job_value '$SUSPENDED' 'yes' update_cron_job_value '$SUSPENDED' 'yes'
increase_user_value "$user" '$SUSPENDED_CRON'
# Sync system cron with user # Sync system cron with user
sync_cron_jobs sync_cron_jobs
@ -56,7 +57,9 @@ sync_cron_jobs
#----------------------------------------------------------# #----------------------------------------------------------#
# Adding task to the vesta pipe # Adding task to the vesta pipe
if [ "$3" != 'no_restart' ]; then
restart_schedule 'cron' restart_schedule 'cron'
fi
# Logging # Logging
log_event 'system' "$V_EVENT" log_event 'system' "$V_EVENT"

View file

@ -45,7 +45,7 @@ jobs=$(cron_clear_search)
# Suspendning # Suspendning
for job in $jobs; do for job in $jobs; do
update_cron_job_value '$SUSPENDED' 'yes' $V_BIN/v_suspend_cron_job $user $job 'no_restart'
done done
# Sync system cron with user # Sync system cron with user

View file

@ -46,6 +46,7 @@ is_job_unsuspended
# Unsuspending job # Unsuspending job
update_cron_job_value '$SUSPENDED' 'no' update_cron_job_value '$SUSPENDED' 'no'
decrease_user_value "$user" '$SUSPENDED_CRON'
# Sync system cron with user # Sync system cron with user
sync_cron_jobs sync_cron_jobs
@ -56,7 +57,9 @@ sync_cron_jobs
#----------------------------------------------------------# #----------------------------------------------------------#
# Adding task to the vesta pipe # Adding task to the vesta pipe
if [ "$3" != 'no_restart' ]; then
restart_schedule 'cron' restart_schedule 'cron'
fi
# Logging # Logging
log_event 'system' "$V_EVENT" log_event 'system' "$V_EVENT"

View file

@ -45,7 +45,7 @@ jobs=$(cron_clear_search)
# Unsuspendning jobs # Unsuspendning jobs
for job in $jobs; do for job in $jobs; do
update_cron_job_value '$SUSPENDED' 'no' $V_BIN/v_unsuspend_cron_job $user $job 'no_restart'
done done
# Sync system cron with user # Sync system cron with user