I'm looking to crontab a script every hour starting Friday at 5pm... ending Monday at 5am.
This script checks if it's completed this week and if it's currently running. If no/no, start task.
Off the top of my head, I know I could do:
#Mins Hours DoMonth Months DoWeek 0 5-17 * * 0,6 /bin/echo "Run Script Sat and Sun Days" 0 17-24 * * 0,5,6 /bin/echo "Run Script Fri, Sat, Sun Nights" 0 0-5 * * 6,0,1 /bin/echo "Run Script Sat, Sun, Mon Mornings"
All the ways I can think involve three parts (Friday night, Sat/Sun all day, Monday Morning).
Is there a more efficient way to do this? Any kind of one/two-liner that would do this hourly, over that time frame?
Or would a simple check inside the script for this time frame (and exit if not in that time frame) be easier?