Cron expression is never executed

The scene is so, the use of the service in sprint bootthe @Scheduled(cron = "${xx.run.schedule}")definition of a regular service, xx.run.schedulethe variables in a configuration file, the service is running, and now want to temporarily disable a few days, think the solution is to modify variables, not going to let him run of course after a few months can be set to perform, and then change it back again a few days, but the idea of a sudden, there will never be executed cron expression, a search, really I have.

February 31, did not take advantage of this loophole, the execution time is set on February 31, the timing of this task is never executed.0 0 5 31 2 ?

source

You can find a lot of dates, so that regular tasks can not be performed using the same principle.

Guess you like

Origin www.cnblogs.com/foolgry/p/11489730.html