-
Notifications
You must be signed in to change notification settings - Fork 2
Description
How the recurring jobs work now is that there is a heartbeat message that gets consumed every time by the heartbeat interval (default 1 minute), where the JobRecurringScheduleListener listens to the Scheduler PreRunEvent, which gets the changes in the recurring jobs from the database and updates the current running schedule.
The ideal solution would be to listen to the JobRecurring postPersist/update events, and update the current running schedule only on that given time, however I was not able to make it work. The changes only took place after restarting the messenger consumer (messenger:consume scheduler_job_recurring), but I'd like the changes to take place in the currently running scheduler without restarting it, which I was only able to do with the PreRunEvent of the Scheduler event.
I think the problem lies somewhere in the getting of the current schedule, where in the PreRunEvent it is loaded, but I was not able to replicate it outside of it.
Only advantage of the heartbeat is that you could check if the scheduler is running by it.
Any help will be much appreciated.