Quartz Scheduler


General J2EE: Quartz Scheduler

  1. Quartz Scheduler (1 messages)

    I am using quartz scheduler in my project. I have requirement that job has to be executed "every two hours from 6 am to 12 pm everyday" means 6am,8am,10am,....10pm everyday. I am not able to form any cron-job Expression for this type of requirement. Please provide solution if i can.
    How i can use this expression in simpleTrigger? While using simpleTrigger also requirement is like that daily I can't start the Scheduler. Only one time Scheduler has to start for whole application.

    Threaded Messages (1)

  2. Quartz Scheduler[ Go to top ]

    As for your cron expression, try "0 0 6-23/2 * * ?". As far as I am aware, a cron expression cannot be used in a SimpleTrigger. If you are trying to produce the above expression using a SimpleTrigger, you might be able to by somehow having your Job reschedule the trigger (or a separate Job, perhaps?), but I wouldn't go to that much trouble. You should be able to do this with CronTrigger.