On Fri, 8 Jul 2011, Les Mikesell wrote:

> To: centos@centos.org
> From: Les Mikesell <lesmikes...@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]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to