简体   繁体   中英

How to use crontab to run a python script every 10 mins RPi

I was trying to run a python script every 10 minutes however, this didn't seen to work for me. I will run through the steps of what I did below: 1. open crontab - 'crontab -e' 2. start a new line that says '10 * * * * python /home/pi/WeatherPi/production/getInfo.py'. From what I have seen on the internet this should then run the script every 10 mins but it didn't seem to for me.

Thank you in advance for any replies, Jacob

To get crontab to run a task every 10 minutes you could type as follow:

*/10 * * * * /path/to/command

or

*/10 * * * * /path/to/script

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM