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
The python script is not getting run. How do I run cron every 10 minutes?
cron
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
The python script is not getting run. How do I run cron every 10 minutes?
Best Answer
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
root
instead ofceasor
for the username and drop thesudo
.