I had an old application that was running on websphere and using old cron job scheduling library which was written in house long time ago.
I am trying to convert it to JBOSS EAP6.4 and I could not determine a good way to convert the job scheduler.
Basically, in the old app we were using a config file that lists the jobs and frequency.
This is an example of the config file
year mo dom dow hr mn prio persist package.class parms
# ==== == === === == == ======= ======= ============================================== ============================
* * * * * 15,45 norm false com.shaw.CronClass1 O
* * * 1,2,3,4,5,6 0-17,19-23 00,30 norm false com.CronClass2 B
* * * 0 1-23 00,30 norm false com.CronClass3 B
The format messy, but basically the first line says: run this job every twice every hour at 15 min and 45 min The second line says: run this job mon-sat between 12AM-5PM and then 7PM-11PM , every 30 minutes.
I want to do something similar with JBOSS , I saw the jboss Timer service http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html
But I don't think it has all those options and I cannot use those settings in annotation because they can change. that's why we put them in an external file that is loaded when the app starts.
Is there any library, tool or a way to this easily ?