millisecond support in cron triggers

1,677 views
Skip to first unread message

JohnVM

unread,
Feb 4, 2009, 1:30:47 PM2/4/09
to Quartz.NET
Hey Guys,

I was wondering if there was any way to support millisecond resolution
in cron triggers? For instance, I have a task that I would very much
like to run at specifically 9:29:59.700 every Tuesday, and am having
difficulty supporting this criteria at the moment.

(I run a stratum-0 time source on our LAN w/ ntpd on all machines so
they all have extremely accurate clocks)

Regards,
John

Marko Lahma

unread,
Feb 4, 2009, 4:48:36 PM2/4/09
to quar...@googlegroups.com
Hi,

Currently there's no support for this kind of accuracy. It could be
troublesome when you think about the instantiation and setup of job
context etc. You would have a "good change" that trigger fires exactly
at .700 milliseconds but the actual job running would obviously be
further away, but really close especially with RAMJobStore. You could
always fire off the job at 9:29:59 and do proper adjustment with some
short sleeping and finding the exact moment to run.

As *nix cron and Quartz don't allow milliseconds another option could
be to have simple triggers with programmatic scheduling for the future
needs, say schedule for 6 next months (4*6 triggers).

Quartz will do it's best to fire job at exactly correct moment, but
millisecond precision is hard to get.

Hope this helps,

-Marko
Reply all
Reply to author
Forward
0 new messages