Trigger a Build Automatically on a Schedule

You can configure a job to run builds on a specified schedule specified in either Coordinated Universal Time (UTC), the primary time standard by which the world regulates clocks and time, or in a timezone, which takes Daylight Savings Time (DST) into account so you don't need to manually change the clock twice each year.

Note:

Regardless of how you set up the schedule, your builds could be delayed if no VM build executors of the job's build executor template are free to run builds at the scheduled time, or if any of the VM build executors are in the Stopped/Pending state.
  1. Open the job’s configuration page.

  2. Click Settings the Gear icon.

  3. Select the Triggers tab.

  4. Click Add Trigger and select Periodic Build Trigger.
    You can specify the schedule using Cron expressions:
    • Use the Expert mode (see steps 5 then 6) if you’re comfortable using Cron expressions.
    • Use the novice mode and set the schedule by specifying values (see step 5 then 7) if you're less familiar with Cron expressions.
  5. In Time zone, select UTC (default) or Another time zone to specify the time setting used for the schedule.

    If you select Another time zone, use the drop down menu to select a location-based time zone to use. Notice that the Time Zone Schedule to the right changes to reflect your selection. There are a few advantages to setting the timezone. You don't need to manually change the clock twice each year (ahead in the Spring and back in the Fall) and you can see the times in the timezone you selected without doing any calculation to know when the trigger will happen in your selected time zone.

    Tip:

    Click Compare Schedules Compare Schedules button and select a different time zone to compare the scheduled times in that time zone to the times in the selected time zone.
  6. To use the expert mode, select the Expert mode check box, and enter the schedule in the text box.

    The default pattern is 0/30 * * * *. This setting runs a build every 30 minutes.

    After you edit the expression, it’s validated as soon as you move the cursor outside the text box. Note that other fields of the section aren’t available when the check box is selected.

  7. To use the novice mode, deselect the Expert mode check box and specify the schedule information in Minute, Hour, Day of the Month, Month, and Day of the Week.

    Click Toggle Recurrence to add or remove 0/ or 1/ at the beginning of the value in the Cron expression.

    The page displays the generated Cron expression next to the Expert mode check box.

  8. If necessary, in Comment, enter a comment.

  9. To view and verify the build schedule of the next ten builds, from the timezone drop-down list, select your time zone and then click View Schedule.

  10. Click Save.