Unix Shell - Re: Daily scheduled job, but need to check if previous job has completed.

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2007 > Re: Daily scheduled job, but need to check if previous job has completed.





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: Daily scheduled job, but need to check if previous job has completed.
Robert Latest

2007-12-06, 1:29 pm

Eliot wrote:
> Thanks for all the help!
>
> [The solution with] Kill -0 posted by Joachim Schmitz solved my
> problem, incidentally kill -0 wasn't in the man page or help on my
> box!


Let me say again that "kill -0", after a reboot, may detect a new, unrelated
process that just happens to have the same ID that your script had before
the reboot. If that new process is a permanently-running service, it will
effectively block your script from ever being re-run.

I prefer a grep on ps's output because there you can check against the
(command-line) name of the process in question.

I wrote something to that effect about a week ago but forgot to post it, so
I posted it just now.

robert
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com