Builds in W4Build can be triggered in various ways, and one powerful option is the use of cron triggers. These allow you to schedule matrix jobs to run at specific times, automating the build process according to a defined schedule.

Cron Triggers

Cron triggers allow you to schedule matrix jobs to run at specified times using a cron-like syntax. This feature is particularly useful for automating build processes on a regular schedule, without manual intervention.

The cron syntax follows the standard five-field format:

* * * * *

Where the five fields represent:

  • minute (0 - 59)

  • hour (0 - 23)

  • day of month (1 - 31)

  • month (1 - 12)

  • day of week (0 - 6) (Sunday = 0)

You can specify each field with a value or use special characters like * (any value), , (multiple values), - (range), and / (step values).

Examples

The following examples will show you the cron expression and how to use the syntax builder

  1. Run a build every day at midnight

0 0 * * *
  • Syntax builder

    ssh home
  1. Run a build every Monday at 9 AM:

0 9 * * 1
  • Syntax builder

    ssh home
  1. Run a build every 15 minutes:

*/15 * * * *
  • Syntax builder

    ssh home
  1. Run a build on the first day of every month at 3:30 AM:

30 3 1 * *
  • Syntax builder

    ssh home

By setting up cron triggers, you can automate your build pipeline efficiently and ensure regular execution without manual intervention.