CRON Commands

cron

Syntax

cron

Context

config>system

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

Commands in this context create scripts, script parameters and schedules which support the Service Assurance Agent (SAA) functions.

CRON features are saved to the configuration file on both primary and backup control modules. If a control module switchover occurs, CRON events are restored when the new configuration is loaded. If a control module switchover occurs during the execution of a CRON script, the failover behavior is determined by the contents of the script.

schedule

Syntax

[no] schedule schedule-name [owner schedule-owner]

Context

config>system>cron

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the type of schedule to run, including one-time only (oneshot), periodic or calendar-based runs. All runs are determined by month, day of month or weekday, hour, minute and interval (seconds).

The no form of this command removes the context from the configuration.

Parameters

schedule-name

Specifies the name of the schedule.

owner schedule-owner

Specifies the owner name of the schedule.

count

Syntax

count number

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the total number of times a CRON ‟interval” schedule is run. For example, if the interval is set to 600 and the count is set to 4, the schedule runs 4 times at 600 second intervals.

Parameters

number

Specifies the number of times the schedule is run.

Values

1 to 65535

Default

65535

day-of-month

Syntax

[no] day-of-month {day-number [..day-number] all}

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures which days of the month that the schedule occurs. Multiple days of the month can be specified. When multiple days are configured, each of them causes the schedule to trigger. If a day-of-month is configured without configuring the month, weekday, hour and minute commands, the event does not execute.

Using the weekday command as well as the day-of-month command causes the script to run twice. For example, consider that ‟today” is Monday January 1. If ‟Tuesday January 5” is configured, the script runs on Tuesday (tomorrow) as well as January 5 (Friday).

See the month, weekday, hour, and minute commands for more information.

The no form of this command removes the specified day-of-month from the list.

Parameters

day-number

Specifies the day of the month counting from the first of the month. The negative integers specify the day of the month counting from the last day of the month. For example, configuring day-of-month -5, 5 in a month that has 31 days configures the schedule to occur on the 27th and 5th of that month.

Integer values must map to a valid day for the month in question. For example, February 30 is not a valid date.

Values

1 to 31, -31 to -1 (maximum 62 day-numbers)

all

Specifies all days of the month.

end-time

Syntax

[no] end-time [date | day-name] time

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command is used concurrently with type periodic or calendar. Using the type of periodic, end-time determines at which interval the schedule ends. Using the type of calendar, end-time determines on which date the schedule ends.

When no end-time is specified, the schedule runs forever.

Parameters

date

Specifies the date to schedule a command

Values

YYYY:MM:DD in year:month:day number format.

day-name

Specifies the day of the week to schedule a command.

Values

sunday, monday, tuesday, wednesday, thursday, friday, saturday

time

Specifies the time of day to schedule a command.

Values

hh:mm in hour:minute format

hour

Syntax

[no] hour {..hour-number [..hour-number]| all}

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures which hour to schedule a command. Multiple hours of the day can be specified. When multiple hours are configured, each of them causes the schedule to trigger. Day-of-month or weekday must also be specified. All days of the month or weekdays can be specified. If an hour is configured without configuring the month, weekday, day-of-month, and minute commands, the event does not execute.

See the month, weekday, day-of-month, and minute commands for more information.

The no form of this command removes the specified hour from the configuration.

Parameters

hour-number

Specifies the hour to schedule a command.

Values

0 to 23 (maximum 24 hour-numbers)

all

Specifies all hours.

interval

Syntax

[no] interval seconds

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the interval between runs of an event.

Parameters

seconds

Specifies the interval, in seconds, between runs of an event.

Values

30 to 4,294,967,295

minute

Syntax

[no] minute {minute-number [..minute-number]| all}

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the minute to schedule a command. Multiple minutes of the hour can be specified. When multiple minutes are configured, each of them causes the schedule to occur. If a minute is configured, but no hour or day is configured, the event does not execute. If a minute is configured without configuring the month, weekday, day-of-month, and hour commands, the event does not execute. See the month, weekday, day-of-month, and hour commands for more information.

The no form of this command removes the specified minute from the configuration.

Parameters

minute-number

Specifies the minute to schedule a command.

Values

0 to 59 (maximum 60 minute-numbers)

all

Specifies all minutes.

month

Syntax

[no] month {month-number [..month-number]|month-name [..month-name]| all}

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the month when the event should be executed. Multiple months can be specified. When multiple months are configured, each of them causes the schedule to trigger. If a month is configured

If a minute is configured without configuring the weekday, day-of-month, hour, and minute commands, the event does not execute.

See the weekday, day-of-month, hour, and minute commands for more information.

The no form of this command removes the specified month from the configuration.

Parameters

month-number

Specifies a month number.

Values

1 to 12 (maximum 12 month-numbers)

all

Specifies all months.

month-name

Specifies a month by name.

Values

january, february, march, april, may, june, july, august, september, october, november, december (maximum 12 month names)

type

Syntax

type {schedule-type}

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command specifies how the system should interpret the commands contained within the schedule node.

Parameters

schedule-type

Specifies the type of schedule for the system to interpret the commands contained within the schedule node.

Values

periodic — Specifies a schedule that runs at a specified interval. The interval command must be specified for this feature to run successfully.

calendar — Specifies a schedule that runs based on a calendar. The month, weekday, day-of-month, hour, and minute commands must be specified for this feature to run successfully.

oneshot — Specifies a schedule that runs one time only. As soon as the first event specified in these parameters takes place and the associated event occurs, the schedule enters a shutdown state. The month, weekday, day-of-month, hour, and minute must be specified for this feature to run successfully.

See interval, month, weekday, day-of-month, hour and minute for more information.

Default

periodic

weekday

Syntax

[no] weekday {weekday-number [..weekday-number]|day-name [..day-name]| all}

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the days of the week on which the schedule runs. Multiple days of the week can be specified. When multiple days are configured, each of them causes the schedule to occur. If a weekday is configured without configuring the month, day-of-month, hour, and minute, the event does not run.

Using the weekday command as well as the day-of-month command causes the script to run twice. For example, consider that ‟today” is Monday January 1. If ‟Tuesday January 5” is configured, the script runs on Tuesday (tomorrow) as well as January 5 (Friday).

See the month, day-of-month, hour, and minute commands for more information.

The no form of this command removes the specified weekday from the configuration.

Parameters

day-number

Specifies a weekday number.

Values

1 to 7 (maximum 7 week-day-numbers)

day-name

Specifies a day by name.

Values

sunday, monday, tuesday, wednesday, thursday, friday, saturday (maximum 7 weekday names)

all

Specifies all days of the week.