Configuring automatic execution of commands in batches
The following steps configure a batch buffer for a set of commands and automatically
run the commands saved in the batch buffer at scheduled time.
- Enter the
configure terminalcommand to enter global configuration mode. - Enter the
batch buffercommand to create and save a group of CLI commands per batch ID and exit global configuration mode. - (Optional) Enter the
write memoryandshow configurationcommand to verify whether the commands added in the batch buffer are saved in the running configuration. - (Optional) Enter the
show clockcommand to display the system clock. The system date and time must be considered while scheduling the batch execution. - Enter the
execute batchcommand to issue the commands that are saved in the batch immediately or at a scheduled time, count, and interval. - (Optional) Enter the
show batch schedulecommand to view the schedule of the batches and status of execution.device# show batch schedule Printing the details of Timer Batch buffer 1 timer is off Batch buffer 2 timer is off Batch buffer 3 timer is off Batch buffer 4 timer is off Printing Details of Start Timer Batch buffer 1 start timer will be executed 0 days 0 hours 4 minutes 20 seconds from now Batch buffer 2 start timer is off Batch buffer 3 start timer is off Batch buffer 4 start timer is off Printing Details of Stop Timer Batch buffer 1 stop timer will be executed 9 days 20 hours 44 minutes 19 seconds from now Batch buffer 2 stop timer is off Batch buffer 3 stop timer is off Batch buffer 4 stop timer is off