I've read the docs, but I'm scratching my head on how to do this. I want to run a cron job during business hours. So my cron.yaml would look something like:
cron:
- description: My Cool Cron Job
url: /myCoolCronJob.php
schedule: every 5 minutes from 06:00 to 19:00 every monday, tuesday, wednesday, thursday, friday
timezone: America/Los_Angeles
That doesn't work, obviously. But it should give you an idea of what I want to do. How can I make this cron job run during business hours?
The Schedule format doesn't offer a combination between the high-frequency
and the low frequency
The way to obtain what you desire is to:
configure the high frequency portion of the schedule in
cron.yaml
:schedule: every 5 minutes from 06:00 to 19:00
check the weekday condition inside the cron job itself, at the beginning and exiting without doing anything if the day of execution is Saturday or Sunday.