Quartz Job not running

I have a quartz job with the 0 0/5 * ? * * cron expression that is supposed to be executed every 5 minutes but I don’t see it working.

But when I execute it manually from quartz job, it works! Is there anything wrong anywhere?

I pasted your expression into the crotab.guru web site and it did not like the ?. Have you tried replacing the ? with * ?

(note: the web site does not expect a leading digit for seconds, but the quartz schedule does)

I copied this cron expression from the Quartz add-on helper as you see below:

image

Thanks for confirming that the suggested cron expression didn’t work at crontab.guru
But when I check the expression within the studio, it says good.

I have tried a different expression that works at crontab.guru:
*/5 * * * *

image

However, Jmix studio doesn’t consider that expression correct and refuses me to save.

Hello.

What is your Jmix version?

What is the ‘Next fire date’ value on your job?

Try Simple trigger instead of Cron expression and check if it works.

1 Like

I have actually also had problems with cronjobs in Quartz.

Apparently Quartz cronjobs are not always compatible with the Linux cronjob format…

I then used the default JMIX cronjobs that came with the e-mail add-on, which worked perfectly.

Unfortunately, the one i used from the default cron job (every 5 minutes) didn’t work. Did you check the one I am trying to use?

For me following worked:

// Seconds | Minutes | Hours | Day of Month | Month | Day of Week | Year
CronScheduleBuilder.cronSchedule("0 0/5 * * * ?")

eq:

0 0/5 * * * ?

image

Hello.

I had no issues with original expression 0 0/5 * ? * *. In general it should be valid for Quartz Scheduler.

However, we will change examples on the help tooltip - ? will be moved to the day-of-the-week position if possible.

Regards,
Ivan