kbmMW Scheduler Tidbits #2 – CRON

Next version of kbmMW will continue to improve on the already very powerful job scheduler built into the framework.

Now UNIX CronTab like scheduling can be made. Examples:

kbmMW supports an extended CronTab format which includes these features.

  • Optional year
  • List of values
  • Ranges
  • Intervals
  • Optional textual day of week
  • Optional textual month name
  • Start time indicator

Syntax for cron: minute hour day month dayofweek year
Year is optional.
Thus 5 or 6 space separated values must be given.

Each of the values can be:

* indicating any value.
? indicating value at schedule time
1,2,3.. list of values
1,4-5,7… list of values
1-5 range of values
*/2 interval… every 2
3-15/3 interval… every 3 starting at 3, ending at 15
Interval values can be used for minute, hour, day, month and year values.

Month can be given as a value 1..12 or text jan, feb, mar, apr,  may, jun, jul, aug, sep, oct, nov, dec.

DayOfWeek can be given as value 1 (monday)..7 (sunday) or mon, tue, wed, thu, fri, sat, sun.

All the other fluent expression supported by kbmMW’s scheduler, like InitialDelay, Starting, Ending, Occurance etc. can be added after the Cron statement.

In addition to Cron, a number of fluent methods like AtYears, AtMonths, AtDays, AtHours, AtMinutes, AtSeconds has been added to allow setting up Cron like schedules without using the Cron string format.

kbmMW Scheduler Tidbits #1 – Async methods

kbmMW Scheduler Tidbits #3

kbmMW Scheduler Tidbits #4

Author: kimbomadsen

3 thoughts on “kbmMW Scheduler Tidbits #2 – CRON

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.