Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Commit a Configuration at a Specified Time Using the Junos XML Protocol

In a Junos XML protocol session with a Junos device, a client application can schedule a commit operation at a specified time in the future. The client executes the <commit-configuration> operation and includes the <at-time> element with the specified time.

To indicate when to perform the commit operation, the client includes the <at-time> element with the time specifier. Table 1 outlines the valid types of time specifiers.

Table 1: <at-time> Time Specifiers
Time Specifier Description Example

reboot

Commit the configuration the next time the device reboots.

  • <at-time>reboot</at-time>

hh:mm[:ss]

Commit the configuration at the specified time (hours, minutes, and, optionally, seconds). The time must be in the future but before 11:59:59 PM on the current day. Use 24-hour time for the hh value. The device interprets the time with respect to its clock and time zone settings.

  • Execute the operation at  4:30:00 AM:
    <at-time>04:30:00</at-time>

  • Execute the operation at 8:00 PM:
    <at-time>20:00</at-time>

yyyy-mm-dd hh:mm[:ss]

Commit the configuration at the specified date and time (year, month, date, hours, minutes, and, optionally, seconds). The specified time must be after you execute the <commit-configuration> operation. Use 24-hour time for the hh value. The device interprets the time with respect to its clock and time zone settings.

  • Execute the operation at 3:30 PM on August 21, 2005:

    <at-time>2005-08-21 15:30:00</at-time>

Note:

The specified time must be more than 1 minute later than the current time on the device.

The Junos XML protocol server immediately checks the configuration for syntactic correctness and returns <rpc-reply>, <commit-results>, and <routing-engine> tag elements. If the syntax check succeeds, the <routing-engine> element encloses the <commit-check-success/>, <name>, and <output> tags. The <name> tag reports the Routing Engine on which the check succeeded, for example, re0 or re1. The <output> element reports the time at which the commit is scheduled.

If the commit check succeeds, the configuration is scheduled for commit at the specified time. The Junos XML protocol server does not emit additional tag elements when it performs the actual commit operation. If the configuration is not syntactically correct, an <xnm:error> element encloses child elements that describe the error. In the case of an error, the commit operation is not scheduled.

The <at-time> tag element can be combined with the <synchronize/> tag, the <log/> tag, or both.

The following example shows how to schedule a commit operation for 10:00 PM on the current day.

Client Application sends XML RPC request to Junos XML Protocol Server to schedule config commit at 22:00. Server replies confirming success with details on routing engine re1.