linux - Scheduling scripts with variable frequency -
i want run python script on ubuntu 14.04 server following frequency:
- monday friday:
- from 0800 hrs 1600 hrs: run once every hour
- from 1600 hrs 2300 hrs: run once every 30 minutes
saturday , sunday:
- from 0800 hrs 2300 hrs: run once every 2 hours
at other times, don't run
is possible cron? if not, can suggest alternative?
as suggested in comments, adding these cron entries do: (lines starting # comments)
# monday friday, 8 4 pm, once every hour 0 8-16 * * 1-5 <command> # monday friday, 4 pm 10 pm, twice every hour 0,30 17-22 * * 1-5 <command> # saturday sunday, 8 11 pm, once every hour 0 8-23 * * 0,6 <command>
Comments
Post a Comment