Help deciphering cron_expression for SN

Sort:
You are not authorized to post a reply.
Author
Messages
Greg Moeller
Veteran Member
Posts: 1498
Veteran Member
    Has anyone had any luck deciphering the cron_expression field in the QRTZ_CRON_TRIGGERS table?
    For example: I have 10 0 9 ? * 6 *
    I know that this notification is scheduled for 9:00 M-F
    I get the 2nd and 3rd fields, but what do the other fields mean?
    Robby
    Veteran Member
    Posts: 87
    Veteran Member
      Greg,
      I've done some testing to see if I could decipher some of this field,
      In our database (LBI 10.2.0.0.126; SQL2008R2)
      The first field represents 'seconds', the second field represents 'minutes', the third field depends upon whether the schedule is 'Daily' or 'Hourly'.
      For 'Daily', the third field is the hour that the schedule will run (24 hour clock).
      For 'Hourly', the third field is the hour range the schedule will run, example 6-18, will run every hour from 6 AM to 6 PM. Absence of an hour range indicates the schedule runs all day.
      (I haven't figured out how a 'Weekly' or a 'Monthly' schedule is represented.) (YET!):-)

      So, an example would be 0 52 14 .....this would be 2:52:00 PM
      -------------
      I haven't figured out the question mark yet (?).
      -------------
      But, the last section, numbers bracketed by asterisk (*) and separated by commas, represent the days of the week the schedule will run. Where Sunday=1, Monday=2, etc.

      -Robby
      Greg Moeller
      Veteran Member
      Posts: 1498
      Veteran Member
        Thanks for the help, Robby.. (and anyone else that is attempting)....
        Unix cron doesn't have seconds, so that was throwing me for a loop.
        In my example, though the 6 confuses me because I know that this schedule is set up for M-F.

        Any additional help is really appreciated!!
        The.Sam.Groves
        Veteran Member
        Posts: 89
        Veteran Member
          QRTZ_CRON_TRIGGERS implies they used the standard Quartz Job Scheduler library.

          I'd suggest skimming over http://www.quartz-schedul...orial-lesson-06.html

          However that leads you back to the same spot, they aren't doing anything special with the format other than adding a second field.

          Are you sure that's the only entry that refers to that notification (i.e. there aren't multiple entries and this is just the one that kicks off Fri/Sat?)
          Greg Moeller
          Veteran Member
          Posts: 1498
          Veteran Member
            Thanks very much for that link! And no, I'm not sure that is the only entry that refers to that notification... I'll check on that as well.
            You are not authorized to post a reply.