How To Schedule A Job To Reboot The HPE / Aruba-OS Switch
Can I schedule my switch to reboot at a specific date and time?
The HPE / Aruba-OS switches have a "job" function that can be configured to run a command at a specific date and time.
This can be used to schedule a switch reboot during the weekend or after business hours.
This can be useful if the switch firmware was updated and needs to reboot into the new firmware during non-business hours.
How to schedule a command to run overnight:
At the Config prompt in the CLI interface, the following command can be configured:
job <name> at HH:MM on MM/DD "command"
To reboot the switch at 11:27 on 07/24
job bootsys at 11:27 on 07/24 "boot system"
Once the job has been configured, you can run the "show job" command to view any jobs that are configured.
To cancel this job:
no job bootsys (removes the job from the queue/config)
job bootsys disable (disables the job so it doesn't run, but keeps it in the queue/config)
Any configured jobs will be listed in the running-config.
The job shown above would show up in the switch config as:
- This example uses the "boot system" command, which will reboot the switch when the job runs.
- If the "write memory" command is applied to save the current configuration before the job runs, the job will remain in the running-config until it is removed using the "no job <name>" command.
- If the "write memory" command is NOT applied before the job runs, the job will be removed from the config after the reboot because it was not saved.
If you created a job to run on January 1st at 9:00 am, this will remain in the config and run every year on January 1st at 9:00 am.
If you create a job to run at 9:00 am with no date specified, it will run every day at that specified time.
If you only want this job to run once, you will want to remove it from the switch config using the "no job..." command after the job has completed.