spring scheduled task run every second with cron(0 0/10 * * * ? )

Paris Tao picture Paris Tao · Apr 3, 2014 · Viewed 27.8k times · Source

it's strange, i setup corn as

@Scheduled(cron= "0 0/10 *  * * ? ")

It did trigger every 10 minutes, but the issue is task runs each second.

Answer

Roaslin picture Roaslin · Jun 29, 2016

This is what javadoc says :

CronSequenceGenerator

the first field of the cron is for seconds.