Put this into /etc/init/web2py-scheduler.conf:
description "web2py task scheduler" 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 <user> python /home/<user>/web2py/web2py.py -K <appname> respawn
This assumes your web2py is installed in <user>'s home directory and runs under <user>'s account.
Replace eth0 if you use a different network interface on the server.
Your scheduler will launch automatically when you reboot your machine, or you can start/stop/restart/check the status of it manually with:
sudo start web2py-scheduler sudo stop web2py-scheduler sudo restart web2py-scheduler sudo status web2py-scheduler