Cisco Command Christmas Calendar #2: reload in x

Time for the second command in my Cisco calendar. You're probably familiar with the reload command but beyond its common use it has nifty options. The reload in x command schedules a reload to take effect after the specified time.

This can be a real life saver in situations when you're making a configuration change that could potentially cause you to lose connectivity to the device. I started using this command as a common practice in maintenance windows. If I entered the wrong command, the device would boot itself, say in 10 minutes, and revert back to its original configuration since the new command was not yet copied to the startup configuration. This method has saved me at least one long drive to the data center.

Router# reload in 10
Reload scheduled for 11:57:08 PDT Fri Apr 21 1996 (in 10 minutes)
Proceed with reload? [confirm]

The reload at x command is similar and it allows a reload to be scheduled at a specified time.  The month and day can also be specified or they can be left out, in which case the reload takes place within 24 hours (the same day if the specified time is later than the current time or the next day if the specified time is earlier than the current time).

Router# reload at 13:00
Reload scheduled for 13:00:00 PDT Fri Apr 21 1996 (in 1 hour and 2 minutes)
Proceed with reload? [confirm]

Router# reload at 02:00 Apr 21
Reload scheduled for 02:00:00 PDT Sat Apr 21 1996 (in 38 hours and 9 minutes)
Proceed with reload? [confirm]

If everything goes as planned, the scheduled reload can be canceled with the reload cancel command.

Router# reload cancel
%Reload cancelled.


UPDATE: Please note Tony E.'s comment below. In older IOS versions, it is very important to remember the keyword in in the command and type it right. If you forget it or type in10, the device will interpret it as a text line/reason. The reason keyword and reason-string were added in 15.0(1)M. You can look at the options using the ?.

Router#reload ?
  LINE        Reason for reload
  at          Reload at a specific time/date
  cancel      Cancel pending reload
  in          Reload after a time interval

Router# reload 10
Proceed with reload? [confirm]


Cisco documentation: reload

Comments

  1. It's important to point out what happens if you forget the "in" in "reload in 10" or if you fat finger it "reload in10". In some older versions of IOS, a string after the "reload" command is a 'reason' or a 'comment'. So if you happen to make the example mistakes I've outlined above you will reload your device upon execution. Once the device boots back up the "reason for reboot" will be "10" or "in10" respectively.

    In modern IOS you cannot make that mistake, the only valid options are:(from my lab)

    R1#reload ?
    at Reload at a specific time/date
    cancel Cancel pending reload
    in Reload after a time interval
    reason Reload reason


    R1#reload 10
    ^
    % Invalid input detected at '^' marker.

    I'll see if I can find what version they stopped the "reload " option.

    (Sorry about the formatting, Google strips formatting from comments)

    Cheers.

    ReplyDelete
  2. Hi Tony, thank you for your comment. This is definitely something to point out. I will update this into the blog.

    ReplyDelete

Post a Comment