[CentOS] Triggering script from cron or web client

Keith Roberts keith at karsites.net
Sat Jul 9 17:22:40 UTC 2011


On Fri, 8 Jul 2011, Les Mikesell wrote:

> To: centos at centos.org
> From: Les Mikesell <lesmikesell at gmail.com>
> Subject: Re: [CentOS] Triggering script from cron or web client

...snip...

> You already have a DB connection in common - can't the update script
> itself lock something in the DB while it works?    Or just make the web
> script wait for the cron job to complete if you are anywhere near the
> time for it to run.

Sounds like it needs to be one main script, that branches 
depending on how it is called - ie from cron or ssh or curl 
or whatever?

Maybe saving the current state of the script in an ENV 
variable whenever the script is run, check for the current 
status of the script before making a decision on what to do, 
when it is called next time?

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------



More information about the CentOS mailing list