Suspend of crontab temprorarily

Hello Friends,

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?

Regards

Yes , it will . I mean the crontab will start scheduling the tasks that are all suppose to execute at the current time.

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?

It depends on your operating system. If you are using GNU/Linux and it has anacron, this may not be the case.

Im using Solaris10 T-1000, cron run, should read about it. thanks

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....

All the best

Thanks a lot VBE, things are clearer on my mind. Besides i can try things in test machines so if i get something very useful i will share it with all.

Regards