You are here: Re: PHP kill cron « All PHP « IT news, forums, messages
Re: PHP kill cron

Posted by J.O. Aho on 10/27/07 13:18

Séverin Richard wrote:
> Hi all,
>
> How can i kill a cron process at the begining of my cron task (php script):

Easy way is to do a killall (see the man page how to use it), of course
this would kill the current process too.

A more advanced is to have a process list (file) where you store the
process number each time that a script is run, the script then kills all
the processes in the list except its own, clear out the processes it has
killed.


> My cron task starts evry 5 minutes,
> but may work more than this time. (no timeout configured on my server
> for cron tasks (?).

Time out is for web servers only, if you want to do a time out thing in
cli scripts, then you need to build it yourself into your scripts.



--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация