Introduction
This document describes a simple workaround that provides functionality similar to the Scheduler feature on the Cisco Nexus 5500 Series switches that use Embedded Event Manager (EEM) scripts.
Prerequisites
Requirements
Cisco recommends that you have basic knowledge of these topics:
- Cisco Nexus 5500 Series switches
- EEM scripts
Components Used
The information in this document is based on these software and hardware versions:
- Cisco Nexus 5500 Series switches
- Cisco Nexus Operating System (NXOS) Version 6.0(2)N2(1) or later
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Problem
The Cisco Nexus 5500 Series switches do not yet support the Scheduler feature in the 5.x, 6.x, or 7.x train. Perform certain tasks every hour or every day, if you are unable to work without the Scheduler feature.
Solution
If you modify the parameters on an EEM script (first supported in NXOS Version 6.0(2)N2(1)), in order to check for a value that always triggers, it simulates the functionality of the Scheduler feature as it alters the poll-interval of the event.
In the next example, the Object Identifier (OID) is used for the CPU on the Nexus (1.3.6....1.1.1.6.1) switch. This OID always returns a value between 0 and 100, so you must ensure that it always triggers when it matches the OID against a value that is less than 12345, an arbitrarily high number against which it always triggers. You must then modify the poll-interval in order to trigger the event at the desired interval (86,400 seconds in this example) so that the desired actions are performed.
cli alias name backupconfig copy running-configuration tftp://[server_IP]/$(SWITCHNAME)_Running-Config_$(TIMESTAMP) vrf management vdc-all
event manager applet Schedule_Backup
event snmp oid 1.3.6.1.4.1.9.9.109.1.1.1.1.6.1 get-type exact entry-op le entry-val
12345 poll-interval 86400
action 1.0 cli command backupconfig
action 2.0 syslog priority notifications msg Running_Config_Backup_Complete
This example copies the running-configuration to a TFTP server every 86,400 seconds, which is every 24 hours. The $(SWITCHNAME) and $(TIMESTAMP) variables are used so that the file is saved with a different name, which allows the server to keep multiple back-up configurations. Use a CLI alias in order to recalculate the TIMESTAMP every time the command is run. Also note that the Running_Config_Backup_Complete message is printed in the syslog.
Related Information