Run cron job every x minutes plus offset seconds

34 Views Asked by At

I understand this cron expression means run every 10 minutes.

0 */10 * ? * *  

However, I've got the application that will run a Quartz job that's deployed to many devices so I want to slightly offset the cron expression by x seconds i.e. every 10 minutes and x seconds, where x will very for each device.

How can I generate the cron expression dynamically based on the x seconds?

0

There are 0 best solutions below