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.
  1. Enter the configure terminal command to enter global configuration mode.
    device# configure terminal
    
  2. Enter the batch buffer command to create and save a group of CLI commands per batch ID and exit global configuration mode.
    device(config)# batch buffer 1 & 
    configure terminal
    hostname ruckus &
    device(config)# exit
    
    The delimiting character (&) enables an onboard editor on which the list of CLI commands is added. The second occurrence of the delimiting character closes the onboard editor. The commands that are saved in the batch buffer are applied on the device only if the execute batch command is issued.
  3. (Optional) Enter the write memory and show configuration command to verify whether the commands added in the batch buffer are saved in the running configuration.
    device# show configuration 
    !
    !
    batch buffer 1 ^C
    configure terminal^C
    hostname ruckus^C
    
  4. (Optional) Enter the show clock command to display the system clock. The system date and time must be considered while scheduling the batch execution.
    device# show clock 
    03:15:04.599 GMT+00 Tue Dec 22 2015
    
  5. Enter the execute batch command to issue the commands that are saved in the batch immediately or at a scheduled time, count, and interval.
    device# execute batch 1 begin 12-22-15 03:20:00 end 12-31-2015 interval days 4
    
  6. (Optional) Enter the show batch schedule command 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