[Wolves] Resuming cron jobs missed

Wayne Morris wayne at machx.co.uk
Tue Oct 14 21:40:13 BST 2003


On Tue, 2003-10-14 at 20:32, Peter Oliver wrote:
> On 14 Oct 2003, Wayne Morris wrote:
> 
> > Is there a way of getting cron jobs to start if they have been missed
> > due to system downtime?
> > I have a series of cron jobs that start every twelve hours, so if the
> > sytem is down at 12am or 12pm I loose 12 hours worth of data.
> > I guess I could just put in lots of cron jobs starting say every 2 hours
> > but that is a lot of typing and entries.
> > 
> > Unless anyone can think of a completely different approach- what I'm
> > doing it running streamer to capture 12 hours worth of security footage
> > into MonMorn directory, followed by another cron job running into MonAft
> > directory and so on thru the week. It then overwrites the data a week
> > later.
> 
> Why run your grabber from cron?  Rather that having it run for just 12
> hours, have it start at system boot time and carry on for ever.


It produces a incrementing series of files of the format picture00001.jpeg, all in the same directory.
So if it ran continuously the directory would contain too many items, its producing 7,200
 files per running hour at the moment- so even this takes an age to serve up as a webpage towards 
the end of the 12 hour run.
Also, if streamer just restarted on boot it would start again from pic00001 and overwrite recent data.

I guess another approach would be to run streamer for say an hour, every hour.
Then run another cron job hourly to zip the pics up into archive, with the archive name being incremented
by one, or the name incorporating the time/date of operation.
This sounds promising, if anyone can give me a hint on how to automate the zip then name bit.   




More information about the Wolves mailing list