I am using Quartz Scheduler to schedule some Jobs, when I was using a simple trigger for hourly and daily intervals it was working fine.
For Monthly and Yearly schedules I moved to Cron Scheduler, it always skips the next fire time If I schedule for Feb 10, but it starts from Mar 10 if I use to run every 2 months it starts on April 10
I tried
0 0 0 10 JAN-DEC/2 ?
Also with
0 0 0 10 */2 ?
Code I use to create the Job trigger
trigger.withSchedule(cronSchedule(cornExpression)
.inTimeZone(TimeZone.getDefault())
.withMisfireHandlingInstructionDoNothing()).startAt(schedulerOptions.getStartsAt());
Value of schedulerOptions.getStartsAt()
Thu Feb 10 20:00:00 IST 2022
the trigger is TriggerBuilder
Here are the Debugger Values of the Trigger Object
After creating the Trigger, I checked for the next fire time, it skipped the next month, below is the debug value of the nextfiretime
How to prevent a token created with OAuth 2.0 from expiring?
I have the following situation:
I work on a REST API, and I'd like to do some very simplistic tests to see how long it takes to process a request
I am trying to implement a WatchService that watches a filesystem for changesOnce files get created I want to create tasks for each new file and add that task to a distributed queue to let it get processed from multiple machines