User blogs

Tag search results for: "cron"
marko

So you have a php script you wish to keep running forever


Create bash file - runsForever.sh

#!/bin/sh

ps aux | grep '[d]aemon.php'

if [ $? -ne 0 ]

then

    php /home/acct/public_html/daemon.php

fi



Create a cron job for every minute

* * * * * /bin/sh runsForever.sh


or run it this way on CLI: 
nohup /bin/sh runsForever.sh &


But when the system reboots, it is gone

marko Nov 20 · Tags: php, ssh, cron

Blogs

marko
So you have a php script you wish to keep running ... more
marko Nov 20
Bankole Ahmed
PHP Introduc tion First of all before we start the... more
marko
The best way to start is to do this: sudo port li... more
marko Nov 6