From: Colm Buckley (colm at domain tuatha.org)
Date: Thu 20 May 1999 - 10:22:30 IST
> Now my impression of a cron job was a program the ran every so often and
> then exits, say every hour:
> 0 * * * * ~dek/seti/setiathome
>
> But setiathome runs infinitely, downloading from the site and
> processing the data. (read the site for details) So how is a cron job
> setup to run a program and if its already running not run it again?
As it happens, setiathome looks to check whether it's already running,
and aborts if it is, so running it from cron is perfectly feasible.
You should redirect stdout and stderr to a log file, though - it
produces output of indefinite length, which cron will collect for
mailing to you if it's not redirected.
0 * * * * ~dek/seti/setiathome >>~dek/seti/seti.log 2>&1
should do the trick.
Colm
-- Colm Buckley B.A. B.F. # colm at domain tuatha.org colm.buckley at domain tcd.ie colm at domain computer.org Department of Computer Science # +353 87 2469146 # whois cb3765 Trinity College, Dublin 2, Ireland. # http://www.tuatha.org/~colm/ A harp is a nude piano.
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:13 GMT