Issue Details (XML | Word | Printable)

Key: QRTZNET-83
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Marko Lahma
Reporter: Praful
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz.NET

CronExample outputs next scheduled fire times misleadingly in UTC format

Created: 06/Jan/08 09:56 AM   Updated: 20/Jan/08 11:22 AM
Component/s: Example Programs
Affects Version/s: 0.9
Fix Version/s: 0.9.1

Environment: Quartz.NET 2005 .Net 2.0


 Description  « Hide
Hello,

I run Samples 3 , It seems Schedule Time not set propers as per CronExpression Meaning.

E.g

18:42:22:687 [INFO] Quartz.Examples.Example3.CronTriggerExample - group1.job5 h
as been scheduled to run at: Tue, 15 Jan 2008 15:00:00 GMT and repeat based on e
xpression: 0 0 10AM 1,15 * ?

Schedule 10AM for 1st ,15th of month but I got Sched.ScheduleJob(trigger) return 15:00 hours on 15th Jan 2008 .
(Current System Time 6th Jan 2008 07 30 PM)

Regrads
PRaful


Select example to run:
[1] Example1 SimpleExample
[2] Example2 SimpleTriggerExample
[3] Example3 CronTriggerExample
[4] Example4 JobStateExample
[5] Example5 MisfireExample
[6] Example6 JobExceptionExample
[7] Example7 InterruptExample
[8] Example8 CalendarExample
[9] Example9 ListenerExample
[10] Example10 PlugInExample
[11] Example11 LoadExample
[12] Example12 RemoteServerExample
[13] Example12 RemoteClientExample
[14] Example13 ClusterExample
[15] Example14 PriorityExample
[16] example15 XmlConfigurationExample

> 3
18:38:49:187 [INFO] Quartz.Examples.Example3.CronTriggerExample - ------- Initi
alizing -------------------
18:38:49:375 [INFO] Quartz.Core.QuartzScheduler - Quartz Scheduler v.0.9.0.2 cr
eated.
18:38:49:390 [INFO] Quartz.Simpl.RAMJobStore - RAMJobStore initialized.
18:38:49:390 [INFO] Quartz.Impl.StdSchedulerFactory - Quartz scheduler 'Example
DefaultQuartzScheduler' initialized
18:38:49:390 [INFO] Quartz.Impl.StdSchedulerFactory - Quartz scheduler version:
 0.9.0.2
18:38:49:390 [INFO] Quartz.Examples.Example3.CronTriggerExample - ------- Initi
alization Complete --------
18:38:49:390 [INFO] Quartz.Examples.Example3.CronTriggerExample - ------- Sched
uling Jobs ----------------
18:38:55:859 [INFO] Quartz.Examples.Example3.CronTriggerExample - group1.job1 h
as been scheduled to run at: Sun, 06 Jan 2008 23:39:00 GMT and repeat based on e
xpression: 0/20 * * * * ?
18:40:06:046 [INFO] Quartz.Examples.Example3.CronTriggerExample - group1.job2 h
as been scheduled to run at: Sun, 06 Jan 2008 23:40:15 GMT and repeat based on e
xpression: 15 0/2 * * * ?
18:40:35:140 [INFO] Quartz.Examples.Example3.CronTriggerExample - group1.job3 h
as been scheduled to run at: Mon, 07 Jan 2008 13:00:00 GMT and repeat based on e
xpression: 0 0/2 8-17 * * ?
18:41:44:937 [INFO] Quartz.Examples.Example3.CronTriggerExample - group1.job4 h
as been scheduled to run at: Sun, 06 Jan 2008 23:42:00 GMT and repeat based on e
xpression: 0 0/3 17-23 * * ?
18:42:22:687 [INFO] Quartz.Examples.Example3.CronTriggerExample - group1.job5 h
as been scheduled to run at: Tue, 15 Jan 2008 15:00:00 GMT and repeat based on e
xpression: 0 0 10AM 1,15 * ?


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Marko Lahma added a comment - 09/Jan/08 01:50 PM
Thanks for reporting this. This is actually caused be example printing the times in UTC and the actual scheduling occurs in local time. I've now fixed the example to print DateTime in CronTrigger's TimeZone (CurrentTimeZone).