-
1. Re: Schedule Reports to Run Daily at Certain Time
djeverson Jan 3, 2008 3:00 PM (in response to djeverson)Any suggestions?
-
2. Re: Schedule Reports to Run Daily at Certain Time
elvisd Feb 8, 2008 7:28 AM (in response to djeverson)don't if can help you, i have configured a user service to run every day at 8:00 AM.
you should implement a schedulable class and define the scheduler in scheduler-service.xml.
Your schedulable class then is called in the given interval.
I have used this link to learn how to do it... (sorry it s in french)
http://www.placeoweb.com/dotclear/index.php/2007/07/18/78-jboss-421ga-deploiement-d-application
To run a task every day at given period just adapt the scheduler config with values as:<attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableClass">org.pagckage.MyClass</attribute> <attribute name="SchedulableArguments">500</attribute> <attribute name="SchedulableArgumentTypes">double</attribute> <attribute name="FixedRate">true</attribute> <attribute name="DateFormat">dd/MM/yy HH:mm</attribute> <attribute name="InitialStartDate">01/01/1970 08:00</attribute> <attribute name="SchedulePeriod">86400000</attribute> <attribute name="InitialRepetitions">-1</attribute>
this configurations calls the perform() method in your org.package.MyClass every day at 8:00 (note the InitialStartDate and SchedulePeriod)
Hope this helps
kindly
elvisd -
3. Re: Schedule Reports to Run Daily at Certain Time
baspet Feb 8, 2008 7:44 AM (in response to djeverson)Hi,
i had the same issue. I solved it calling "select count(*) from qrtz_job_details" and if count > 0 just skip. It's not exactly what i wanted but it works. Any better idea from seam team would be welcomed.
V. -
4. Re: Schedule Reports to Run Daily at Certain Time
javadeveloperx Feb 8, 2008 8:13 AM (in response to djeverson)You can configure your Jboss to not persist the timer:
in \server\default\deploy\ejb-deployer.xml change persistencePolicy to 'noop':<mbean code="org.jboss.ejb.txtimer.EJBTimerServiceImpl" name="jboss.ejb:service=EJBTimerService"> <attribute name="RetryPolicy">jboss.ejb:service=EJBTimerService,retryPolicy=fixedDelay</attribute> <attribute name="PersistencePolicy">jboss.ejb:service=EJBTimerService,persistencePolicy=noop</attribute> <attribute name="TimerIdGeneratorClassName">org.jboss.ejb.txtimer.BigIntegerTimerIdGenerator</attribute> <attribute name="TimedObjectInvokerClassName">org.jboss.ejb.txtimer.TimedObjectInvokerImpl</attribute> <depends optional-attribute-name="TransactionManagerFactory" proxy-type="org.jboss.tm.TransactionManagerFactory"> jboss:service=TransactionManager </depends> </mbean>