On 9/27/06, stephan beal
On Wednesday 27 September 2006 08:07, Jan Engelhardt wrote:
The 'problem' with cron is that it was designed for periodic tasks, not one-time tasks.
It can be done, though: have your cron job install a separate crontab file, replacing the existing one. At the end of your job (or at the beginning), do:
crontab my_new_crontab_file
Interesting idea.. but a little strange too. At least for this purpose, when I want to schedule one shot jobs. Your suggestion is to have one crontab file for each job and "chain them"?
You can keep several different crontab laying around and load them at will. Using 'crontab -e' you can edit the current crontab, and using 'crontab -l' you can dump the current crontab to stdout:
crontab -l > my_old_crontab_file
To address your earlier post about at:
Thanks for your input. I think rather than scripting around at, using lock files etc, I will write a python script with a scheduling queue and timers. I think that will work better for me. Thanks, Claes