Skip to content

Is it possible to run it every 2 hours but only between 9AM-9PM? #219

Answered by JohnRoesler
grande2020 asked this question in Q&A
Discussion options

You must be logged in to vote

There isn’t currently support with the functions directly, although it would be nice to allow At(atTime string) to accept instead a variadic value At(atTimes []string…).

In the meantime you can accomplish what you want with the crontab schedule.

scheduler.Cron(“0 9,11,13,15,19,21 * * *”).Do()

I used this link to generate that

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JohnRoesler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants