Re: PHP kill cron



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
.



Relevant Pages

  • Re: How to kill a logged in user?
    ... > in your script. ... >> Anyone know what packages are on the rescue CD? ... How to kill a logged in user? ... Also on my TODO list is a mailing list export/import modul, from which we can convert mail threads into FAQs. ...
    (Fedora)
  • RE: How to kill a logged in user?
    ... How to kill a logged in user? ... information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, ... > in your script. ... from which we can convert mail threads into FAQs. ...
    (Fedora)
  • Re: setrlimit() extension suggestion
    ... but there are hundreds of students using ... to kill them off based on wallclock time. ... and they can be killed off by the script in a somewhat reliable way. ... Note that such a script would have a very slight exposure to killing the wrong ...
    (comp.os.linux.development.system)
  • Re: Privileges and killing a process
    ... >Hi Lee - ... sure seems like a lot of code when you can run a simple script ... then the application will kill them. ... >>>Dim hProcess As Long ...
    (microsoft.public.vb.general.discussion)
  • Re: bash for-loop - syntax error: operand expected
    ... Bash has kill built in. ... This was originally a C-Shell script which I had to ... inside of the for loop. ... PIDs as they have already been killed previously, ...
    (comp.unix.shell)