Change the cronExpression of a CronQueueEntry

#1

Hello,
I have changed the cronExpression of a Cronjob but it is not changed in the CronQueueEntry (c3Grid(CronQueue.find()).
How can I updated the context in the CronQueueEntry object ?

0 Likes

#2

Only changing the schedule expression (e.g. via upsert/update) will only apply the new schedule after the previously scheduled execution. If you intended to have it take effect immediately you should have called job.schedule() for your job. Since I’m guessing you didn’t do that, you can now call job.pause(), followed by job.resume() to have it replace the currently scheduled entry.

0 Likes