I have a python script running as a service on Ubuntu11.10. I need to stop the service and then restart it again every 6 hours. I wrote the cronjob and just to check its working, i am stopping and starting the service every 5 mins. Following is the line in my crontab:
*/5 * * * * stop server && start server
I have written the above line in root's crontab. But its not working at all. From CLI the root can stop and start the server absolutely fine. But on automating it using cron, it's not working. Any ideas what I am doing wrong?
Referred the following page for the cronjob syntax.
Referred this as well, but didnt worked for me.