I need to write a scheduler for our application however not sure which will suit better for our scenario.
Can somebody let me know the advantages of quartz scheduler(Cron type scheduling) over
java Timer task API?
And which one is suitable for the following scenario:
I am reading the triggering time from the configuration file which contains two values:
1) Scheduling Time: time when the scheduler will trigger
2)
Unit: It can be Minutes, hours and days
Case 1: if Unit is Minutes:
If suppose Scheduling time in configuration file is 5 and unit is minutes then the scheduler should be trigerred in every Five minutes from the current time.
Case 2: if unit is Hours
It can take value between 0-23, suppose Scheduling time is 22 and unit is hours then the scheduler should be trigerred every day at 10 PM.
Case 3: if unit is days
If scheduling time is 40 and unit is days then the scheduler should be trigerred after every 40 days. suppose if todays date is 27th may then schduler should be trigerred on 6th July.
I know it is a kind of complex requirement and want to decide on which is the best suitable for this (Quartz or Timertask) along with the quartz scheduler adavantages over timer tasks.
Thanks