cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule a script

Schedule a script

EtherNation_Use
Contributor II
Create Date: Nov 26 2012 9:33PM

Is there a way I can schedule a script to disable some ports in the night and re-enable them again. I want to reboot a POE device every night.

di inline-power port X
en inline-power port X

This should do it but I am trying to figure out if we can schedule the scripts without using Ridgeline? (from Arpit_Bhatt)
7 REPLIES 7

EtherNation_Use
Contributor II
Create Date: Nov 28 2012 1:46PM

Hello Arbhatt

UPM is used for any "scripting" that needs to happen based on an event. That event can be time as we did here, it could be based on a device using LLDP (for example a phone connects in and you want to move it to a VLAN and set up ACLs and QoS), it could be a user authentication (set a level of ACL or QoS for a certain user) or it can be based on a log message (if event A is seen i the log then do this. The this is the UPM profile)

A script is static and is used for doing something needed on the switch. For example doing a grep for a variable or executing a series of commands to set up a configuration. Something that does not need to happen on a regular basis. It is possible to use UPM to launch a script. There is a script for fdboui where the script used the OUI of the MAC address from the FDB table to tell you which manufacturer is on each port. I have used UPM to launch that script every hour and post the information to the log which in turn gets sent to a syslog server.

Ridgeline is just a central location to manage all of this information from UPM to scripts. It is the way to deploy a UPM profile to the whole network if needed as an example.

Does that help?

P (from Paul_Russo)

EtherNation_Use
Contributor II
Create Date: Nov 27 2012 10:51PM

That makes sense. Thanks for the information.

Any idea when you would use UPM scripts over .xsf scripts?
1) If there is no Ridgeline.
Any other scenarios?

In this case I am using Ridgeline and have a script task schedule for port enable/disable. (from Arpit_Bhatt)

EtherNation_Use
Contributor II
Create Date: Nov 27 2012 10:22PM

Hey Arbhatt

Yes you can do this using two UPM Profiles. UPM profiles are scripts that are dynamic. Here's how to do this for the disable power part you would do the same for enable inline power

Create upm profile power_off
disable inline power port X
.
Note that the "." has to be the by itself in the last line

Once the profile is built you create and add a timer

Create upm timer power_off_Timer
config upm timer "power_off_timer" at 11 27 2012 20 00 00 every 86400 (this timer would kick off at 8:00 pm and execute every day. Time is in seconds)

This attaches the timer to the profile

config upm timer "power_off_timer" profile "power_off"

You would do the same thing for the power on just pick a new time.

Hope that helps
P (from Paul_Russo)
GTM-P2G8KFN