Quartz scheduler and job 'firing' a second early?

It could be that the different clocks are marginally offset, so when the quartz scheduler starts on 18:00:00 005 it could be that the database still thinks its 17:59:59 980.

It could be that the different clocks are marginally offset, so when the quartz scheduler starts on 18:00:00 005 it could be that the database still thinks its 17:59:59 980. If its really an issue to you, you might want to sleep the thread some hundred millis so its always correct.

And it is an issue because various updates are scheduled and these are being missed when the problem occurs. – Mr Morgan Dec 7 at 18:01 1 I wouldn't rely on that being 100% correct at any time. Also it could be that one part uses millis and the other uses nanos so when the time is '17:59:59 9991' quartz says: okay that 1800 but the database disagrees.

Why don't you use the java Date so everything uses the same time? – Angelo Neuschitzer Dec 7 at 18:04 I suspect you you may be right in thinking that the two clocks might be ever-so-slightly out of synch. I use the JavaSQLDateTime class because it is convenient and works very well in the application at hand.

But delaying the thread by one second if the time is not to the hour might be an answer. – Mr Morgan Dec 7 at 18:09 I'm going to post this to Quartz and see what they think as well. – Mr Morgan Dec 7 at 18:10 Or simply converting the time to a String and reformatting mins and secs if they are not 00.

– Mr Morgan Dec 7 at 18:56.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions