The seven fields from left to right are seconds, minutes, hours, days, months, days of the week, and years. . . . The last one is optional. The same seven fields are executed when they match the current time. . .
n/m represents every m starting from n, that is, n,n+m,n+2m.... * represents any possible value. For example, when used in seconds, it is 0, 1, 2, 3,..., 59 ?. It can be used in days and days of the week, indicating that this field is ignored. It feels no different from *, but in the document Say there is a difference and let yourself experience it (your sister). . . It seems that if you only give the value of one field and ignore the other, use ?
Executed every 5 seconds
The seven fields from left to right are seconds, minutes, hours, days, months, days of the week, and years. . . . The last one is optional.
The same seven fields are executed when they match the current time. . .
n/m
represents everym
starting fromn
, that is,n,n+m,n+2m....
*
represents any possible value. For example, when used in seconds, it is0, 1, 2, 3,..., 59
?
. It can be used in days and days of the week, indicating that this field is ignored. It feels no different from*
, but in the document Say there is a difference and let yourself experience it (your sister). . . It seems that if you only give the value of one field and ignore the other, use?
http://www.quartz-scheduler.o...
http://www.quartz-scheduler.o...
If you are asking about crontab
It will be executed every 5 minutes.
There is a special online generator for corn expressions. You don’t need to remember it. Just read it a few times and it’s almost done