Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to specify timezone in quartz scheduler

AmitSoaDevMay 19 2009 — edited May 20 2009
Hi,

I want to initiate a job at a particular time - 6 AM EST every Monday. The cron expression can help me do "6 AM every Monday" part, but not the EST part. How do I specify a timezone. I could not find any examples pertaining to doing this in quartz used in a web application. I found some links that talked about doing this in spring framework - http://forum.springsource.org/archive/index.php/t-16381.html
My web.xml currently looks like this:

<?xml version = '1.0' encoding = 'windows-1252'?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
<description>Empty web.xml file for Web Application</description>
<!--servlet>
<servlet-name>QuartzInitializer</servlet-name>
<servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>config-file</param-name>
<param-value>bpel_quartz.properties</param-value>
</init-param>
</servlet-->
<servlet>
<servlet-name>BPELSchedulerServlet</servlet-name>
<servlet-class>com.otn.samples.BPELSchedulerServlet</servlet-class>
<init-param>
<param-name>cronExpr</param-name>
<param-value>0 0 6 ? * MON</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>BPELSchedulerServlet</servlet-name>
<url-pattern>/bpelschedulerservlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>35</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>

TIA

Amit
This post has been answered by James Taylor-Oracle on May 19 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2009
Added on May 19 2009
3 comments
6,333 views