gocraft / work

Process background jobs in Go
MIT License
2.4k stars 339 forks source link

Periodic Enqueue is not working as expected #195

Closed rishi-suresh-keshav closed 2 years ago

rishi-suresh-keshav commented 3 years ago

I am having hard time defining the cron spec. Works for some cases but not all.

 // every 2 mins works.. 
worker.PeriodicallyEnqueue("0 0-59/2 * * * *", "Task1")
worker.Job("Task1", (b.bjctx).Task1)
 // every day at 7am doesn't work..  Also, the `webui` doesn't show the in the scheduled job page
worker.PeriodicallyEnqueue("0 0 7 * * *", "Task1") // works.. 
worker.Job("Task1", (b.bjctx).Task1)

Any help is much appreciated. Thanks

@cypriss