Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 719
Paris Tao Avatar asked Apr 03 '14 08:04

Paris Tao


1 Answers

This is what javadoc says :

CronSequenceGenerator

the first field of the cron is for seconds.

like image 78
Roaslin Avatar answered Dec 10 '22 16:12

Roaslin