-2

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

  • This should make the cronjob run once every hour at 0:10, 1:10, 2:10 etc. – Håken Lid Feb 26 '18 at 22:44
  • You should add a shebang to the script and make it executable. Or use full path to python as well as the script file. Or add `PATH` variable to crontab file. https://stackoverflow.com/a/2409369/1977847 – Håken Lid Feb 26 '18 at 22:45

1 Answers1

0

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

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

or

*/10 * * * * /path/to/script
casol
  • 496
  • 1
  • 7
  • 12