-
1. Re: Multiple Scheduling - "n" times a day, every day
vaedama Nov 27, 2011 3:03 AM (in response to while_true)Take a look at Quartz Scheduler.
http://www.quartz-scheduler.org/
I will prefer to have my own Quartz scheduler than the one that ships with JBoss. You may not need the service.xml anymore!
-
2. Re: Multiple Scheduling - "n" times a day, every day
while_true Nov 28, 2011 6:49 AM (in response to vaedama)Venkat,
Thank you so much for the tip!
It is really a good choice but I'll try to dig a little bit further for an answer for my scheduler-service.xml problem.
Because it doesn't make any sense to have a scheduler that only runs or once a day or "n" times in only one day, right?! This functionality should also provide the possibility of using schedulers that operate every day, "n" times a day... Or am I being too greedy?
-
3. Re: Multiple Scheduling - "n" times a day, every day
while_true Nov 30, 2011 12:38 PM (in response to while_true)I've finally adopted the solution of having another instance of the service I wanted:
<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="org.jboss.mx.timer.JBossTimer" name="jboss:service=Timer"> </mbean> <mbean code="workers.SchedulerMonitor" name="Workers:name=SchedulerMonitorAppServer"> </mbean> <mbean code="org.jboss.varia.scheduler.Scheduler" name="Workers:service=SchedulerMonitorAppServer,name=SchedulerMonitorAppServerScheduler"> <attribute name="StartAtStartup">false</attribute> <attribute name="SchedulableMBean">Workers:name=SchedulerMonitorAppServer</attribute> <attribute name="SchedulableMBeanMethod">printHelloWorld()</attribute> <attribute name="DateFormat">yyyy-MM-dd HH:mm:ss</attribute> <attribute name="InitialStartDate">2011-11-30 11:30:00</attribute> <attribute name="SchedulePeriod">86400000</attribute> <attribute name="InitialRepetitions">-1</attribute> <attribute name="FixedRate">true</attribute> </mbean> <mbean code="org.jboss.varia.scheduler.Scheduler" name="Workers:service=SchedulerMonitorAppServer,name=SchedulerMonitorAppServerScheduler2"> <attribute name="StartAtStartup">false</attribute> <attribute name="SchedulableMBean">Workers:name=SchedulerMonitorAppServer</attribute> <attribute name="SchedulableMBeanMethod">printHelloWorld()</attribute> <attribute name="DateFormat">yyyy-MM-dd HH:mm:ss</attribute> <attribute name="InitialStartDate">2011-11-30 11:35:00</attribute> <attribute name="SchedulePeriod">86400000</attribute> <attribute name="InitialRepetitions">-1</attribute> <attribute name="FixedRate">true</attribute> </mbean> </server>
This way, replicating the services, I can have n schedulers, even though I think code replication shouldn't be the best approach.
If someone has another idea please let me know... On the meanwhile I'm stiking with this solution!
Grateful for your attention.
Best regards.