I have a python script on my RaspberryPi that I want to run at these general times:
- Weekdays, after 4:30 PM until 00:00 running every 30 minutes
- Weekends, after 8:00 AM until 00:00, running every 60 minutes
I know how to schedule it daily with Cron,
30 16 * * 1-5 /mnt/myHDD/myscript.py
but can't figure out how to have it run every X minutes, until Y time.
I think to run every 30 minutes, I'd do this correct? But how to also run every hour from 16:30 until 02:00 next day?
1-59/30 * * 1-5 /mnt/myHdd/myscript.py
Edit: sorry, to clarify it doesn't have to be exactly every 30 minutes...the script simply downloads pictures from my phone to my rpi and I'd like it to run every so often during the weekdays when I'm home (ie after 1630/1700) and then on weekends every say hour from general "waking hours".
*/30
will run every 30 minutes of matching hours, including at 1600 on weekdays.