tags:

views:

201

answers:

3

I have a Perl script that needs to run following an annual schedule with specific dates and times of when to start and stop. I don't believe crontab can handle this. Is there a Perl module (even a non-perl implementation would be fine) that can help me with this? If it helps, I m running this on a linux box.

Also, the schedule has only 15-20 aberrations (days on which the process must start and stop at a different time).

+1  A: 

You might try fcron. It handles down systems, starting jobs based on system load, and e-mails you if a job doesn't run. Most Linux distributions should already have a package for it.

Robert Wohlfarth
+11  A: 

I usually find that the best way to handle this is to set up cron with an easy superset of the needed dates (every day, or every hour, whatever) and have the script itself determine if it's the right time to run. If not, just exit before you do anything.

friedo
This is what I do in the same situation.
brian d foy
+2  A: 

Couldn't a cron job trigger twice; once to start and once to stop? with a pid file in a known location you can handle this easily. Also when there's schedule changes, just create too many cron jobs that cover the regular times and the different times, then have the job check to see if this is a valid time to start.

dlamblin