[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cron question
- To: Ishai Parasol <ishai-iglu(at-nospam)parasol.org.il>
- Subject: Re: cron question
- From: mulix <mulix(at-nospam)actcom.co.il>
- Date: Sun, 16 Dec 2001 13:07:30 +0200 (IST)
- Cc: Linux - IL Mailing List <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <000701c18620$773015c0$0201a8c0@parasol>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Sun, 16 Dec 2001, Ishai Parasol wrote:
> What can I do if I want to run a script on a regular basis using cron, but I
> need it between the system's crons (lets say every 3 hours) ?
sorry, but what exactly do you mean? if you mean that you need it to run
every three hours, it's very easy to do - man 5 crontab.
if you mean that you need to run it as a user as well as having it run
as a cron job, just put it someplace accessible to both cron and the
user.
if you need it to run at different times (every two to five hours from
the last time it was run, depending on some parameter, for example),
just do a neat hack and schedule it to run *once* at some start time,
but in each invocation of the script, the script should schedule itself
to run sometime in the future. this can barf if the script dies
unexpectedly without having a chance to reschedule itself, so make sure
to have it "restarted" once a day, if necessary.
--
mulix
http://vipe.technion.ac.il/~mulix/
http://syscalltrack.sf.net/
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il