On Monday 17 February 2003 18:16, John Pettigrew wrote:
I have set up cron jobs to back up my system (thanks to those who recently posted links about this!). However, crontab entries are only (IIUC) executed when the values match the current time and date. Unfortunately, my box would thus go unbacked up if it wasn't turned on at the specified time.
Specifically, I have a script that moves the weekly system backups over to a monthly archive. This is set to run on the first of each month. However, if (for example) this was a weekend, the computer might not be on.
So, my question - is there a way to set things up so that a script will be run on a specific date or as soon after that as the computer is turned on? Even better, is it possible to set it up so that the script would run at a specified time (outside the working day) on the specified day or the first day thereafter (but at the specified time of day)?
You could set up a series of jobs, over say 3 days. If the first thing the script does is to check whether it's executed within the last 3 days (by checking file timestams, or a lock-type file) then only one will complete, the subsequent ones will die knowing they don't need to run. Dylan -- "Sweet moderation Heart of this nation Desert us not We are between the wars" Billy Bragg