I would like to know how to set the cron expression with respect to GMT time.
For eg. I have @Scheduled(cron = '0 0 0 * * *').should I add the time difference to the cron expression
Thanks
I would like to know how to set the cron expression with respect to GMT time.
For eg. I have @Scheduled(cron = '0 0 0 * * *').should I add the time difference to the cron expression
Thanks
That will use the default TimeZone (internally it calls TimeZone.getDefault()). Is that not GMT in your case?
Mark Fisher
Spring Integration Lead
SpringSource, a division of VMware
http://www.springsource.com
http://www.springsource.org/spring-integration
http://blog.springsource.com/main/author/markf
Well, if you are interested in the adjustment to current/default timezone then you don't need to do anything since CronTrigger will always use a Default TimeZone if one is not provided.
However if not you'd need to specify it.
We probably need to expose TimeZone attribute somehow, but for now all you need to do is specify a reference to CronTrigger instance. For example:
Code:<bean id="cronTrigger" class="org.springframework.scheduling.suppor.CronTrigger"> <constructor-arg value="your cron expression"/> <constructor-arg ref="ref to a TimeZone bean"> </bean>
Oleg Zhurakousky
Spring Integration team
http://twitter.com/z_oleg
http://blog.springsource.com/author/ozhurakousky/
Well, if you are interested in the adjustment to current/default timezone then you don't need to do anything since CronTrigger will always use a Default TimeZone if one is not provided.
However if not you'd need to specify it.
We probably need to expose TimeZone attribute somehow, but for now all you need to do is specify a reference to CronTrigger instance. For example:
Code:<bean id="cronTrigger" class="org.springframework.scheduling.suppor.CronTrigger"> <constructor-arg value="your cron expression"/> <constructor-arg ref="ref to a TimeZone bean"> </bean>
Oleg Zhurakousky
Spring Integration team
http://twitter.com/z_oleg
http://blog.springsource.com/author/ozhurakousky/
Yes Mark, its not GMT in my case, it is PST.
Should a timezone bean class needs to be defined and how can cron trigger be specified in the scheduled annotation.
Thanks
Is it possible to give a timezone attribute in the scheduled annotation.
Thanks
Please clarify how to give the reference to the cronTrigger in the scheduled annotation
Please help.
Thanks
Please tell me how to start the task at 12.00 am GMT time everyday,that can be specified in the cron expression in the scheduled annotation .
Thanks a lot to help me with this.