From 1fc90fdb6de0ebf964d85c84f8221b6106f76ff0 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 6 Jul 2015 04:46:56 -0500 Subject: [PATCH] scripts/web2py-scheduler.conf --- scripts/web2py-scheduler.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/web2py-scheduler.conf diff --git a/scripts/web2py-scheduler.conf b/scripts/web2py-scheduler.conf new file mode 100755 index 00000000..46eae509 --- /dev/null +++ b/scripts/web2py-scheduler.conf @@ -0,0 +1,21 @@ +description "web2py task scheduler" + +# INSTRUCTIONS: +# COPY THIS FILE IN: +# /etc/init/web2py-scheduler.con +# +# To start/stop the scheduler, use +# "sudo start web2py-scheduler" +# "sudo stop web2py-scheduler" +# "sudo status web2py-scheduler" +# +# YOU MAY HAVE TO EDIT PATH TO WEB2PY BELOW + +start on (local-filesystems and net-device-up IFACE=eth0) +stop on shutdown + +# Give up if restart occurs 8 times in 60 seconds. +respawn limit 8 60 + +exec sudo -u www-data python /home/www-data/web2py/web2py.py -K parking > /tmp/scheduler.out +respawn