Re: cron question / process queue

2008-03-08 Thread John Abreau
On Fri, March 7, 2008 9:57 am, Steven W. Orr said: Still sounds like a job for at, no? If a job is scheduled with cron, and something unexpected causes it to miss running or the script to crash before it completes, then it still gets run at the next scheduled time. If the script uses at

Re: cron question / process queue

2008-03-07 Thread Kent Johnson
Steven W. Orr wrote: This is a classic question: How to run something on a periodic basis that may take longer to execute than the interval between the next occurance. Think of it not as a task that needs to be run at an interval so much as a task that needs to be rescheduled after it

Re: cron question / process queue

2008-03-07 Thread Steven W. Orr
On Friday, Mar 7th 2008 at 07:49 -, quoth Kent Johnson: =Steven W. Orr wrote: = This is a classic question: How to run something on a periodic basis that = may take longer to execute than the interval between the next occurance. = Think of it not as a task that needs to be run at an interval

Re: cron question / process queue

2008-03-07 Thread Kent Johnson
Steven W. Orr wrote: Still sounds like a job for at, no? I don't see it. I have monthly, weekly and daily jobs that I want to run sequentially, in that order, starting at 8pm. How would I do that using 'at'? Preferably without making the actual jobs know about each other, e.g. not teaching

Re: cron question / process queue

2008-03-07 Thread Bruce Dawson
You can also use dotlockfile, lockfile, or dotlock to create a lock file for each task that is running. Then have the 'daily' script kick off the right process for whichever lockfile is not there. Of course, the task has to remove the lock file when its done. --Bruce Kent Johnson wrote: Steven

Re: cron question / process queue

2008-03-07 Thread Brian Chabot
Kent Johnson wrote: I made a combined job that basically does this: if it is the first of the month: run monthly job and wait for completion if it is Saturday: run the weekly job and wait for completion run the daily job The combined job is scheduled for 8pm execution with cron.

Re: cron question / process queue

2008-03-07 Thread Michael ODonnell
I don't see it. I have monthly, weekly and daily jobs that I want to run sequentially, in that order, starting at 8pm. How would I do that using 'at'? Preferably without making the actual jobs know about each other, e.g. not teaching the weekly job that it should be followed by the

Re: cron question / process queue

2008-03-07 Thread Kevin D. Clark
Michael ODonnell writes: Of course, synchronization-wise things get interesting as soon as any job takes longer than the hourly interval because the next hour's queue-runner has to know not to interfere with the one that's still active. A lock-file should be enough to handle that, though.

Re: cron question / process queue

2008-03-05 Thread Steven W. Orr
On Tuesday, Mar 4th 2008 at 12:53 -, quoth Kent Johnson: =Hi, = =I have a server that runs regular daily, weekly and monthly updates, all =scheduled with cron. = =The updates are lengthy - the weekly update now takes about 8 hours - =and I would like for them not to overlap. I also want

cron question / process queue

2008-03-04 Thread Kent Johnson
Hi, I have a server that runs regular daily, weekly and monthly updates, all scheduled with cron. The updates are lengthy - the weekly update now takes about 8 hours - and I would like for them not to overlap. I also want them to run at night, for some reasonable value of night, so I can't

Re: cron question / process queue

2008-03-04 Thread Michael ODonnell
Just thinking out loud here, but one extremely low-tech way to do it might be to have your daily/weekly/monthly cron jobs create a work queue by depositing disposable copies of the desired scripts into a special directory with names guaranteed to be sequential and unique (like, say,