Help for SAP Data Hub Cockpit

Cron Expression Format

Use cron expressions to define the recurrence condition that the tool must use to schedule the task workflow execution.

Cron Format

Cron expression is a string comprising of seven fields. The table lists the order of fields (from left to right) in a cron expression and the permitted values for each field.

Cron Field (from left to right)

Description

Year

4-digit representation for year, for example, 2015

Month

Numeric representation for month. Permitted: 1 to 12

Day

Day of month. Permitted: -31 to 31 (Negative values are calculated from the end of the month)

DayOfWeek

3-letter representation for day of week. Permitted: mon, tue, wed, thu, fri, sat, sun

Hour

Representation for hour. Permitted: 0 to 23

Minute

Representation for minute. Permitted: 0 to 59

Second

Representation for minute. Permitted: 0 to 59

Cron Syntax

The table illustrates the syntax that the tool supports to define a cron expression.

Expression

Where Used

Value

.

Anywhere

Any value

*/a

Anywhere

Any a-th value

a:b

Anywhere

Values in range a to b

a:b/c

Anywhere

Every c-th value between a and b

a.y

DayOfWeek

On the a-th occurrence of the weekday y (a = -5 to 5) On the a-th occurrence of the weekday y (a = -5 to 5)

a,b,c

Anywhere

a or b or c

Cron Expression: Examples

The table lists some examples for creating a valid cron expression and its meaning

Expression

Description

2015 * * fri 12 0 0

Run the schedule every Friday in 2015 at 12:00

* * 3:-2 * 12:14 0 0

Run every hour between 12:00 and 14:00 every day between the third and second-to-last day of the month

* * * -1.sun 9 0 0

Run the schedule on the last Sunday of every month at 09:00.