I need to run a particular program once in a week,once in a month and once in a while
CronTrigger trigger = newTrigger()
.withIdentity("trigger1", "group1")
.withSchedule(cronSchedule("0/20 * * * * ?"))
.build();
What all changes should be done in the above code?particularly in this part("0/20 * * * * ?"))
please help
You’ll need to switch between multiple schedules depending on the user’s choice:
You can of course change the zeroes to other values if you want to change the time. See a full guide here.