I have a python script on my desktop : /home/ceasor/Desktop/script.py
In /etc/crontab I wrote
0 */2 * * * ceasor sudo python /home/ceasor/Desktop/script.py
But it is not working?
|
I have a python script on my desktop :
But it is not working? | |||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
try this:
*/10 this will fire cronjob every 10th minute or you can enumerate every minute that you want it to fire off:
| ||||
|
feedback
|
|
For every ten minutes you need
and if the script is in | |||
|
feedback
|
|
Your line means runs at 0 minutes every two hours (ie 00:00, 02:00, 04:00, etc). If you want to run something every 10 minutes :
I took the liberty to correct the wrong path. FYI, these are the meaning of the values :
And if you want to run something as root, you should put | |||
|
feedback
|
|
To run something every ten minutes, I normally put something like the following in my crontab:
Adjust the 0,10,20,... as you need to hit the minutes of the hour you want. | |||||
feedback
|
sudo python? If you want to run it as root, just specify that user in yourcrontab. Also0 */2means every 2 hours, not every 10 minutes. – Joachim Sauer Mar 15 '11 at 13:57