I'm familiar with Cron on linux systems but by using Quartz Jobs, I have some doubts as the format is not really standard...
I would need a confirmation of the cronExpression syntax...
Here is the CronExpression I use to trigger my Job every 10 Min:
0 10 * ? * *
And here is the CronExpression to start this Job the last day of month at 11:15pm:
0 15 23 L * ?
Can you confirm the syntax is correct ? my expression to start every 10 min works fine, but it will avoid me to wait until the end of the month to test the second one !
CodePudding user response:
There are two points to consider here.
The cron expression. What if it changes in the future? Other than reading the manual, lots of information is available online for describing or generating cron expressions (for just one example see here: https://www.freeformatter.com/cron-expression-generator-quartz.html)
Testing it. How are you testing? The question lists Java. Are you using JUnit? Some code is needed but in general to be sure it will fire when you want it to, write a unit test and mock or override the system time.