Is there a way to create a cron expression to run for every half an hour during the day and every 4 hours during the night?
I am using this cron expression inside a cloud scheduler that runs the GCP cloud function.
I think this should do the trick:
0,30 7-23,0-6/4 * * *
So this runs on every 0
th and 30
th minute of the hour from 7
til 23
and then every 4
th hour from 0
to 6
.
You can also have crontab.guru explain it to you.