CRON commands

cron

Syntax

cron

Context

config>system

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

Commands in this context create scripts, script parameters and schedules that 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 will be determined by the contents of the script.

schedule

Syntax

schedule schedule-name [owner schedule-owner]

[no] schedule

Context

config>system>cron

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

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, including platforms configured in the access-uplink operating mode

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

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

[no] day-of-month

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

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

Using the weekday command as well as the day-of-month command will cause the script to run twice. For example, consider that ‟today” is Monday January 1. If ‟Tuesday January 5” is configured, the script will run 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. The positive integers specify 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 will specify 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

end-time [date | day-name] time

[no] end-time

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

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

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

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

[no] hour

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command specifies which hour to schedule a command. Multiple hours of the day can be specified. When multiple hours are configured, each of them will cause the schedule to trigger. The 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 will 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

interval seconds

[no] interval

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command specifies 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

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

[no] minute

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command specifies the minute to schedule a command. Multiple minutes of the hour can be specified. When multiple minutes are configured, each of them will cause the schedule to occur. If a minute is configured, but no hour or day is configured, the event will not execute. If a minute is configured without configuring the month, weekday, day-of-month and hour commands, the event will 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

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

no month

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command specifies the month when the event should be executed. Multiple months can be specified. When multiple months are configured, each of them will cause the schedule to trigger. If a month is configured without configuring the weekday, day-of-month, hour, and minute commands, the event will 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 by 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, including platforms configured in the access-uplink operating mode

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 which runs at a given interval. The interval must be specified for this feature to run successfully.

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

oneshot — Specifies a schedule which 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. 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

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

no weekday

Context

config>system>cron>sched

Platforms

Supported on all 7210 SAS platforms as described in this document, including platforms configured in the access-uplink operating mode

Description

This command specifies which days of the week that the schedule will fire on. Multiple days of the week can be specified. When multiple days are configured, each of them will cause the schedule to occur. If a weekday is configured without configuring the month, day-of-month, hour, and minute commands, the event will not execute.

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

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

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

Parameters

day-number

Specifies a weekday by 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.