Debian Developers - Re: multiple job instances with cron (was: New virtual package: cron-daemon)

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > July 2004 > Re: multiple job instances with cron (was: New virtual package: cron-daemon)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: multiple job instances with cron (was: New virtual package: cron-daemon)
Matthias Urlichs

2004-07-30, 7:52 am

Hi, Steve Greenland wrote:

> On 06-Jun-04, 08:33 (CDT), Bernd Eckenfels <lists@lina.inka.de> wrote:
>
> Mostly bookkeeping. "Intentional" in the sense that code is not
> structured in a way that would allow easy retrofitting of such a
> feature, i.e. there was no consideration of such a feature when the code
> was written.


Well, I wrote such a patch five years ago. It's quite simple to do a
quick 90% solution (i.e. one where processes will be ignored if they
happend to be running while you reload).

The 100% solution would require giving the jobs unique IDs, and thus a
change in file formats. *Sigh*.

Anyway, if you want five-minute intervals between ten-minute cron jobs,
you can
- tell your daemon to create+check a pid file
- use shlock or a similar shell helper (part of INN. Available separately.)
to manage a pid file
- use a shell script
while sleep 300 ; do JOB; done
- use a cron-like program which can do it
- write your daemon in such a way that multiple executions won't hurt
- do more than one of the above at the same time
- just run the thing every fifteen minutes and deal with the fallout if it
happens to run longer than that
- probably somthing else I've missed.

So there. ;-)

--
Matthias Urlichs


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com