Hi Randy,

that was my original plan, but I though there maybe a better way others may use or suggest :)

Appreciate the feedback,

Mike

Randy W. Sims wrote:
On 4/1/2004 3:46 PM, Mike Blezien wrote:

Hello,

I need to setup a cronjob to run a script every 2hrs, but if another particular
script(executed via a standard web form), on the same machine, is being
executed, I want the cron script "wait" or "sleep();" till the other script is
finished.


Is this possible to do and how is the best way to accomplish this task. :)


If you are able to modify both scripts, the traditional solution would be to have the cgi script create a lock file on startup, removing it when exiting. Then your other script can check for the presence of the lock file, if it exists, wait.

Regards,
Randy.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to