Creating a Cron Expression Schedule

A cron expression is a string of five fields separated by a blank space.

Enter the cron expression in the following format:

<minute> <hour> <days of month> <months> <days of week>

Following are the valid field values that you can use in the cron expression:

  • <minute>: 0–59
  • <hour>: 0–23
  • <days of month>: 1–31
  • <months>: 1–12 (for January to December)
  • <days of week>: 1–7 (for Monday to Sunday)

For example, to run the schedule at 23:00 on the 15th day of any month, enter this expression: 0 23 15 * *

A field can also have the following special characters:

  • * : Represents any value.
  • , : Separator for more than one value. For example, for <days of week>, 2,3 represents Tuesday and Wednesday.
  • - : Range of values. For example, for <days of week>, 1-3 represents Monday through Wednesday.
  • / : Step values. For example, for <minute>, */30 represents every 30 minutes.
Note

You can't create a schedule that triggers at an interval of less than 30 minutes. Only intervals of 30 minutes or more are allowed.

For example, you can create a schedule with the expression */30 * 15 * * to run the schedule every 30 minutes on the 15th day of any month. You can't, however, define a schedule with */15 * 15 * *.

Use the following procedure to create a schedule by writing a cron expression.

Was this article helpful?