I have an Ubuntu 12.04 installation and a PHP script I want to re-run as soon as it terminates. I'm using upstart and this myscript.conf
in /etc/init/
:
start on startup
stop on shutdown
exec php5 /var/myscript.php
respawn
I can run my script using start myscript
, which works fine one-time, but I can't get the script to respawn once it terminates.
Is there something special I have to pay attention to when trying to respawn a PHP script?