I have a python based application which works like a feed aggregator and needs to be part of init.d script so that I could control the execution with start/stop/restart options. Also I want the init.d script to be setup as a cron job (I have example here).
I found one sample here http://homepage.hispeed.ch/py430/python/daemon
(PS. I don’t want the script to be written in python itself).
You could consider writing a Upstart task for operating systems which use Upstart.
Example:
Add this to a file, say ‘zeya.conf’ in /etc/init
and then you can control the job using ‘initctl’. For eg: