Handling missed cron jobs on not-always-on machines

cron(8) (and periodic(8), which is called by cron(8)) are great for automatically running system maintenance commands on servers that are always on. Laptops and other mobile devices are typically switched on and off as needed, so it is likely that tasks scheduled in root's or a user's crontab(1) file will often be missed. For example, I would like my laptop to run a backup job every 24 hours. If my laptop is switched off for more than 24 hours, I would like the backup to occur when it is next switched on. It would certainly be possible to write a job management utility that is called every few minutes (much like atrun(8) is configured to run every five minutes from from /etc/crontab) to do this. A set of scripts checking for scheduled at(1) jobs and queuing them if they don't exist could also get the job done. Is there something already in the base system that would meet my needs? In terms of ports, I found sysutils/uschedule, which may be configurable to do what I want. Are there other utilities as part of the ports collection that you have used and could recommend?
 
Back
Top