Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Upgrade (not)' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Upgrade (not)
Authored by: babbage on May 07, '01 02:22:55PM
Ok, so adjust the cronjob to only launch if setiathome isn't running:
0 * * * * cd setidir; ((ps ax | grep seti | grep -v grep) || ./setiathome -nice 19) > /dev/console 2> /dev/console

Check for the presense of the setiathome process, filter out the check itself, and if the check fails then launch seti again. There's probably about a million ways to do this ("timtowtdi"), but as a general rule I still think that ways that work through the cron system are going to be more suitable than ways that try to avoid or work around it.

My actual line goes to /dev/console (now, but I may put it back to /dev/null if I decide I'd rather have it run quietly), and more importantly it also sends an email if anything goes wrong (which seems like a better alert mechanism than the console anyway, at least to me -- it can go to another machine, can be read later, etc).

[ Reply to This | # ]