First of all, how well do you know the Quartz or cron trigger expressions? I could be wrong, but 10 * * * * ? * 10 * * * * ? * will trigger every 10 seconds every minute, but I have never seen such an expression, it may not work at all.
Are you trying to create a trigger to run every 10 seconds? In this case, use a simple trigger as follows:
new SimpleTrigger((NORMAL_AUCTION + ++NORMAL_AUCTION_COUNTER), "Normal Auction", d, d1, SimpleTrigger.REPEAT_INDEFINITELY, 10000L);
Edit:
Well, therefore, if necessary, you need a trigger that fills the fire only once, at the end of the auction. To do this, use SimpleTrigger as follows:
new SimpleTrigger((NORMAL_AUCTION + ++NORMAL_AUCTION_COUNTER), "Normal Auction", d1, null, 0, 0L);
The start date in this case does not matter if you started it at the appropriate time (end time) and only once.
And as an additional note, do not calculate such dates. I suggest you try the Joda Time library . A really simple and well-known replacement for the awkward standard Date / Calendar API.
source share