Symbols
A
C
- C Series Controllers
- C Series controllers
- C Series platforms
- candidate configuration
- CLI
- command hierarchy
- command history
- command mode
- configuration mode
- command completion
- commands 1, 2
- comparing
- entering 1, 2
- exiting
- hierarchy 1, 2, 3
- navigation commands
- overview 1, 2
- statement description
- symbols in statement lists 1, 2
- verifying configurations
- editing level 1, 2
- environment settings
- help 1, 2
- interface elements
- keyboard sequences
- messages
- modes
- operating systems
- overview 1, 2
- password
- prerequisites
- privilege levels
- prompt strings
- tutorial
- working directory
- command output
- commands
- commit and-quit command 1, 2
- commit check command
- commit command 1, 2
- configuration
- configuration files
- configuration hierarchy
- configuration mode See CLI
- configuration statements
- deleting
- overview 1, 2
- symbols in statements
- configure command
- conventions
- count filter
- cursor, moving
- customer support 1
D
- delete command 1, 2
- directories on C Series Controller
- documentation
E
- edit command 1, 2
- enable command
- environment settings, CLI 1
- except filter
- exit command 1, 2
F
H
I
K
L
M
- manuals
- messages
- MORE filter
- MORE prompt
N
O
- online help See CLI, help
- operational mode
P
Q
R
- redrawing screen
- regular expressions
- rename command 1, 2
- request system halt command
- request system reboot
- restart command 1, 2
- rollback command 1, 2
- run command
S
- save command
- screen
- set cli complete-on-space command
- set cli directory command 1, 2
- set cli language command
- set cli level command
- set cli password command
- set cli prompt command
- set cli screen-length command
- set cli screen-width command
- set cli terminal command
- set command 1, 2
- show cli authorization command
- show cli command
- show cli history command
- show cli level command
- show command
- show component command 1, 2
- show configuration command
- show system information command
- SRC CLI
- starting
- SRC components
- SRC modules
- SRC software
- statements See configuration statements, names of individual statements
- support, technical See technical support
- symbols in statements
T
U
- up command
- URLs in commands
- user accounts
W
X
Download This Guide
Related Documentation
- SRC Script Services Overview
- SRC CLI Overview
Configuring a Schedule for Executing the Commands or Scripts (SRC CLI)
To periodically execute the SRC CLI commands or scripts according to a given schedule, use the system schedule schedule-name command. You can use the redirection operator (>) with the commands or scripts to redirect the command execution output to a file.
Use the following statements to schedule a repetitive task on an SRC system:
To periodically execute the commands or scripts according to a given schedule:
- In configuration mode, enter the name of the schedule
that is capable of adding schedule entries for the executable scripts
or commands. A schedule name can contain alphanumeric characters only.
In this sample procedure, src1cron is the
name of the schedule.[edit]user@host# edit system schedule src1cron
- (Optional) Enter the day of the week on which you want
the command or script sequence to execute. The default value is *
(asterisk).[edit system schedule src1cron]user@host# set day-of-week day-of-week
- (Optional) Enter the month of the year in which you want
the command or script sequence to execute. The default value is *
(asterisk).[edit system schedule src1cron]user@host# set month month
- (Optional) Enter the day of the month on which you want
the command or script sequence to execute. The default value is *
(asterisk).[edit system schedule src1cron]user@host# set day-of-month day-of-month
- (Optional) Enter the hour of the day at which you want
the command or script sequence to execute. The default value is *
(asterisk).[edit system schedule src1cron]user@host# set hour hour
- (Optional) Enter the minute at which you want the command
or script sequence to execute. The default value is * (asterisk).[edit system schedule src1cron]user@host# set minute minute
Table 5 lists the values allowed for the periodic strings (such as day-of-week, month, day-of-month, hour, and minute).
Table 5: Values Allowed for the Periodic Strings
Options
Values
day-of-week
0–7 (where both 0 and 7 mean Sunday) or SUN-SAT
month
1–12 or JAN-DEC
day-of-month
1–31
hour
0–23
minute
0–59
You can use multiple combinations of the special characters described in Table 6.
Table 6: Available Special Characters
Special Characters
Meaning
*
Indicates all values.
For example, to execute the command or script every hour:
user@host# set hour *
/
Indicates the increments of ranges.
For example, to execute the command or script at the third minute of the hour and every 15 minutes thereafter:
user@host# set minute 3-59/15
,
Indicates to separate the values of a list.
For example, to execute the command or script on Mondays, Wednesdays and Fridays:
user@host# day of week MON,WED,FRI
-
Indicates the ranges.
For example, to execute the command or script every hour from 3 through 10:
user@host# set hour 3-10
- (Optional) Enter the special string values such as reboot, yearly, annually, monthly, weekly, daily, midnight, and hourly at which you want the command or script sequence to
execute.
For example, to execute the command or script at midnight on the first day of each month:
[edit system schedule src1cron]user@host# set special-string monthlyNote: If you configure both special string values and periodic string values (such as day-of-week, month, day-of-month, hour, or minute options), a message indicating that both special strings and periodic strings cannot be defined is displayed when you commit the changes.
Table 7 lists the special string options.
Table 7: Special String Options
Options
Description
reboot
Executes the command or script at boot and reboot of the system.
yearly
Executes the command or script at midnight, January 1 each year.
annually
Executes the command or script at midnight, January 1 each year.
monthly
Executes the command or script at midnight on the first day of each month.
weekly
Executes the command or script at midnight each Sunday.
daily
Executes the command or script at midnight each day.
midnight
Executes the command or script at midnight each day.
hourly
Executes the command or script at on the first second of every hour.
- Configure the complete path of the script to be executed
for the schedule.
Note: The script and command options are mutually exclusive. You cannot configure both options at the same time.
[edit system schedule src1cron]user@host# set script scriptNote: The CLI editing level must be set to expert by using the set cli level expert command for this option.
- Configure the CLI command to be executed for the schedule.
Note:
- The script and command options are mutually exclusive. You cannot configure both options at the same time.
Before you configure a CLI command for the schedule, perform the following steps to make sure that you can configure the CLI command as part of the schedule execution:
- Enter the CLI command in the shell with the cli –c “command name” option.
- Verify whether the CLI command returns the expected output.
[edit system schedule src1cron]user@host# set command command - (Optional) Verify your configuration.user@host# show src1cron {command show;day-of-month 7;day-of-week 5; hour 11;minute 0; month 12;}
Related Documentation
- SRC Script Services Overview
- SRC CLI Overview