Creating schedules

You can use schedules to determine when certain events, such as builds and backups, occur.

To create a schedule, you must have administrative permissions.
A schedule can be used in many product areas. For example, you can create a schedule that triggers nightly builds and add it to a project trigger. Schedules are used with cleanup options, see Managing cleanup settings. You can create two types of schedules:
  • Interval-based schedules use a fixed time interval to determine when events occur.
  • Cron-based schedules can use complex criteria to define when events occur.
  1. From the IBM® UrbanCode™ Build dashboard, click System, then click Schedules.
  2. Click Create Schedule then define the schedule type:
    • To create a cron-based schedule, select cron expression.
    • To create an interval-based schedule, select interval schedule.
  3. Optional: If you selected cron expression, complete the following steps.
    1. Type a name for the schedule in the Name field
    2. Enter the cron expression in the Cron Expression field.

      A cron expression is a string of six mandatory properties and one optional properties. Properties must be defined in the order they are presented in the table. Separate properties with white spaces. Use the following table to complete the expression:

      Table 1. Cron expression properties
      Name Expected values
      Seconds 0-59
      Minutes 0-59
      Hours 0-23
      Day of Month 1-31
      Month 1-12 or JAN-DEC
      Day of Week 1-7 or SUN-SAT
      Year (optional) empty, 1970-2099

      The following special characters can be used in expression properties:

      Table 2. Special characters
      Character Description
      * All values. For example, "*" in the minute field means every minute.
      ? Used in the day-of-month and day-of-week fields and means no specific value. Use this character when you need to specify something in one field but not another.
      - Specifies a range of values. For example 10-12 in the hour field means the hours 10, 11 and 12.
      , Specifies additional values. For example MON,WED,FRI in the day-of-week field means the days Monday, Wednesday, and Friday.
      / Specifies increments. For example 0/15 in the seconds field means the seconds 0, 15, 30, and 45.
      L Used in the day-of-month and day-of-week fields. Short-hand for last, but it has a different meaning in the 2 fields. For example, the value L in the day-of-month field means the last day of the month. Used in the day-of-week field by itself, it means 7 or SAT. Used in the day-of-week field after another value, it means the last x day of the month. For example, 6L means the last Friday of the month. When you use this character, do not specify lists, or ranges of values.
      W Used in the day-of-month field. Specifies the weekday (Monday-Friday) nearest the day. For example, 15W means the nearest weekday to the 15th of the month. If the 15th is a Saturday, the trigger is on Friday the 14th. If the 15th is a Sunday, the trigger is on Monday the 16th. If you specify 1W and the first is a Saturday, the trigger is on Monday the third because it does not cross the month boundary. Cannot be used for a range or list of days. L and W can be combined. For example, LW means the last weekday of the month.
      # Used in the day-of-week field. Specifies the nth day of the month. For example, 6#3 means the third Friday of the month (day 6 = Friday and #3 = the third one in the month). If you specify #5 and there is not 5 of the specified days-of-week in the month, the trigger does not occur that month.
      C Used in the day-of-month and day-of-week fields. Short-hand for calendar, which means values are calculated against the associated calendar. If no calendar is associated, it represents an all-inclusive calendar. For example, 5C in the day-of-month field means that the first day included by the calendar on or after the fifth.
      0 0 * ? * MON-FRI means run every hour every Monday, Tuesday, Wednesday, Thursday, and Friday.
    3. Click Save.
      The builds that match your search criteria are displayed.
  4. Optional: If you selected interval schedule, complete the following steps.
    1. Type a name for the schedule in the Name field
    2. Enter the number of minutes between event triggers in the Build Interval (minutes) field.
    3. Enter the time when the schedule starts in the Interval Start Tim (hh:mm) field.
    4. Click Save.