You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The static trigger inside a class with a quartz cron expression works.
However, this has the down side that every time a server reboots, it restarts the cronjob.
This is not acceptable behavior in many applications.
We need to be able to programmatically start and stop recurring tasks at runtime.
Removing a recurring task works programatically. (Though it does throw multiple exceptions.)
jesqueSchedulerService.deleteSchedule("MyDemoJesqueJobTrigger")
However, the jesqueSchedulerService#schedule functionality silently fails to add the same recurring job that works from static triggers.
jesqueSchedulerService.schedule("MyDemoJesqueJobTrigger, "0/5 * * * * ?", Constants.JESQUE_CRONJOB_QUEUE_NAME, TestRecurringJob.simpleName, [])
Jesque lacks the quartz cron expressions support that grails jesque has. The quartz cron expression is much better for many use cases than setting the milliseconds between job executions.
v1.2.1 plugin
3.1.16 grails
The text was updated successfully, but these errors were encountered:
edwardotis
changed the title
scheduling a recurring task programmatically silently fails
programmatically scheduling a recurring task silently fails
May 22, 2017
The static trigger inside a class with a quartz cron expression works.
However, this has the down side that every time a server reboots, it restarts the cronjob.
This is not acceptable behavior in many applications.
We need to be able to programmatically start and stop recurring tasks at runtime.
Removing a recurring task works programatically. (Though it does throw multiple exceptions.)
jesqueSchedulerService.deleteSchedule("MyDemoJesqueJobTrigger")
However, the jesqueSchedulerService#schedule functionality silently fails to add the same recurring job that works from static triggers.
jesqueSchedulerService.schedule("MyDemoJesqueJobTrigger, "0/5 * * * * ?", Constants.JESQUE_CRONJOB_QUEUE_NAME, TestRecurringJob.simpleName, [])
This scheduling behavior works correct in jesque.
https://github.com/gresrun/jesque#recurring-jobs
Jesque lacks the quartz cron expressions support that grails jesque has. The quartz cron expression is much better for many use cases than setting the milliseconds between job executions.
v1.2.1 plugin
3.1.16 grails
The text was updated successfully, but these errors were encountered: