execute batch
execute batch
batch-id
{
after
duration
|
at
at-time
at-date
|
cancel
}
execute batch
batch-id
now
[
{
count
count-value
|
end
end-date
[
end-time
]
}
[
interval
{
days
value
|
hours
value
|
mins
value
}
]
]
execute batch
batch-id
begin
start-date
[
[
start-time
]
[
end
end-date
[
end-time
]
]
[
interval
{
days
value
|
hours
value
|
mins
value
}
]
|
count
count-value
[
interval
{
days
value
|
hours
value
|
mins
value
}
]
|
end
end-date
]
Batch execution of CLI commands is not enabled.
- after duration
- Schedules to run the commands in a batch after a specified period of time. The duration can be configured up to a maximum period of 49 days from the current system clock time. The duration is specified in the dd:hh:mm format indicating that the commands will be executed after the specified number of days, hours and minutes respectively.
- count count-value
- Specifies the number of times the commands in a batch must run. The range for the number of iterations is from 1 through 50.
- end end-date
- Specifies the date on which the batch command execution must stop. An end-date must be specified, followed by an end-time which is optional.
- end-time
- Specifies the time at which the batch command execution must stop. The default end-time is 23:59:59 of the specified end-date.
- interval
- Specifies the time interval at which the commands in a batch must run. The default value is 30 minutes. The time interval can be specified in days, hours, or minutes.
- days value
- Specifies the time interval in days at which the commands in a batch must run. The range is from 1 through 16 days.
- hours value
- Specifies the time interval in hours at which the commands in a batch must run. The range is from 1 through 24 hours.
- mins value
- Specifies the time interval in minutes at which the commands in a batch must run. The range is from 1 through 60 minutes.
Privileged EXEC mode
At a particular instance, a batch can be scheduled only once.
A batch buffer cannot be scheduled when the batch execution process for that batch is in progress.
When a telnet or SSH session executing a batch command is closed, the corresponding batch execution will be cancelled.
Any command that requires user intervention will fail during batch execution.
The
no batch buffer
batch-id command from the global configuration mode removes the configured batch.
The following example runs the commands that are saved in the batch buffer after 5 days, 3 hours, and 1 minute from the current system clock time.
device# execute batch 1 after 05:03:01
The following example runs the commands that are saved in the batch buffer at 04:05 AM on December 22, 2015.
device# execute batch 1 at 04:05:00 22-12-15
The following example runs the commands that are saved in the batch buffer immediately.
device# execute batch 1 now
The following example runs the commands that are saved in the batch buffer immediately and for a total of 5 times at an interval of 30 minutes (default interval).
device# execute batch 1 now count 5
The following example runs the commands that are saved in the batch buffer immediately and for a total of 5 times at an interval of 2 hours.
device# execute batch 1 now count 5 interval hours 2
The following example runs the commands that are saved in the batch buffer immediately and continues to execute the batch at an interval of 30 minutes (default interval) until 11:59 PM and 59 seconds (default end-time) on December 22, 2015.
device# execute batch 1 now end 12-22-15
The following example runs the commands that are saved in the batch buffer immediately and continues to execute the batch at an interval of 30 minutes (default interval) until 10:20 AM on December 22, 2015.
device# execute batch 1 now end 12-22-15 10:20:00
The following example runs the commands that are saved in the batch buffer immediately and continues to execute the batch at an interval of 4 days until 10:20 AM on December 22, 2015.
device# execute batch 1 now end 12-22-15 10:20:00 interval days 4
The following example cancels the configured schedule to issue the commands in a batch.
device# execute batch 1 cancel
The following example runs the commands that are saved in the batch buffer infinitely starting from 12 AM (midnight) (default start-time) on December 22, 2015 at an interval of 30 minutes (default interval).
device# execute batch 1 begin 12-22-15
The following example runs the commands that are saved in the batch buffer infinitely starting from 12 AM (midnight) (default start-time) on December 22, 2015 at an interval of 4 hours.
device# execute batch 1 begin 12-22-15 interval hours 4
The following example runs the commands that are saved in the batch buffer starting from 12 AM (midnight) (default start-time) on December 10, 2015 and continues to execute the batch at an interval of 30 minutes (default interval) until 11:59 PM and 59 seconds (default end-time) on December 22, 2015
device# execute batch 1 begin 12-10-15 end 12-22-15
The following example runs the commands that are saved in the batch buffer infinitely starting from 3:20 AM on December 22, 2015 at an interval of 30 minutes (default interval).
device# execute batch 1 begin 12-22-15 03:20:00
The following example runs the commands that are saved in the batch buffer infinitely starting from 3:20 AM on December 22, 2015 at an interval of 3 days.
device# execute batch 1 begin 12-22-15 03:20:00 interval days 3
The following example runs the commands that are saved in the batch buffer starting from 3:20 AM on December 10, 2015 and continues to execute the batch at an interval of 30 minutes (default interval) until 11:59 PM and 59 seconds (default end-time) on December 22, 2015.
device# execute batch 1 begin 12-10-15 03:20:00 end 12-22-15
The following example runs the commands that are saved in the batch buffer starting from 3:20 AM on December 10, 2015 and continues to execute the batch at an interval of 4 hours until 4:10 AM on December 22, 2015.
device# execute batch 1 begin 12-10-15 03:20:00 end 12-22-15 04:10:00 interval hours 4
| Release version | Command history |
|---|---|
| 08.0.40 | The begin keyword and corresponding options were introduced. Also, options such as count and end were added to the now keyword. |