This might be a bit overkill but I find it works for me: *# reread configuration files sudo supervisorctl reread # stop the program if it is running. sudo supervisorctl stop myprogram # remove the old program configuration sudo supervisorctl remove myprogram # add the new program configuration sudo supervisorctl add myprogram # start the program sudo supervisorctl start myprogram*
Also be careful when using non-absolute paths, like 'echo'. They can be source of frustrating errors. Try '/bin/echo' instead, assuming that is its location on your system. On Fri, Nov 2, 2012 at 8:29 AM, Hussain Tamboli <[email protected]>wrote: > Hi, > I have installed supervisor on my machine using sudo apt-get install > supervisor. I want to run a python script with supervisor. When I append > below code to /etc/supervisor/supervisord.conf > > > [program:gearman] > command=/usr/bin/python /home/foo/worker.py > numprocs=2 > autostart=true > autorestart=true > user=gearman > stopsignal=KILL > > and do sudo service supervisor restart/ sudo service supervisorctl > restart, I can't make my python script run. > > I have been trying this with simple conf snippets too like > [program:echo] > command=echo "hi" >>/home/foo/echo.txt > > Also sometime it gives errors like "unknown process". I am going crazy, I > can't make it run. Please help. > > I will really appreciate a quick response with good explanation. > Thank you. > > *Hussain Tamboli* > Software Developer > [image: Screen-Magic Mobile Media pvt ltd.] > > > return 'hello world'; > Designed with WiseStamp - > <http://r1.wisestamp.com/r/landing?u=a75d3bb40c4ca423&v=3.11.21&t=1351859000482&promo=10&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_10>Get > yours<http://r1.wisestamp.com/r/landing?u=a75d3bb40c4ca423&v=3.11.21&t=1351859000482&promo=10&dest=http%3A%2F%2Fwww.wisestamp.com%2Femail-install%3Futm_source%3Dextension%26utm_medium%3Demail%26utm_campaign%3Dpromo_10> > > > _______________________________________________ > Supervisor-users mailing list > [email protected] > http://lists.supervisord.org/mailman/listinfo/supervisor-users > > -- Todd DeLuca http://todddeluca.com http://wall.hms.harvard.edu/
_______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
