I would like to find out if there is a way to suspend crontab script? I need to suspend the scheduling of crontab scripts in case of an alarm and when alarm ends need to start them again automaticaly, could you suggest me a method?
one of participiant of the forum with name aigles said:
To suppress all jobs from crontab :
crontab -l > cronfile.dat # Save actual crontab file
crontab -r # Remove crontab file
To restore all jobs :
crontab < cronfile.dat
This is a solution but after restoring process could crontab reschedule the tasks?
Thanks for reply. After i restored tasks in crontab, tasks will be reloaded with same execution times, not different time right? And it might be really weird question but is there a way to set the execution times of crontab tasks automatically or cant we talk about automization when crontab is not alreadly in use?
Why < ?
There is no need... the syntax is crontab <filename>
This said on solaris you remove your cronfile to desactivate the cron jobs and recall using your cronfile works fine,,, but I know some parano�ds who edit and comment out all entries....