Auto run script to bring port down at certain time/

trying to find a way to automatically bring a port down at certain time of the day and then bring it back up at a different time.
basically we want to disconnect a phone (cisco 7940) at end of business day and reconnect in the am. 
any ways to do this thru script or a functionality built into cisco os?
edit: switch 2960x

Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
This might be doable with EEM scripting.  Note - there's an EEM scripting forum, where you might find help.
Does the port really need to be taken down, or would blocking its operation at night suffice?  If the latter, a timed based ACL might be used.

Similar Messages

  • Auto Run script On Event

    Is there a way to run a script (.command) on Events such as "Ethernet Cable Plugged"?

    Whenever you run the script in your AppleScript Editor, the app will conveniently highlight the specific line of code that triggered the error.
    That will go a long way towards narrowing down the problem.
    At first glance, though, I'd guess the problem is in the line:
    set theEvent to the last event of calendar "Work"
    That's because the preceding line says:
    tell calendar "Work"
    In other words, you're already focussing on the 'Work' calendar, and telling it to find an event in its own 'Work' calendar isn't going to work (no pun intended).
    The solution is simple. Since you're already focussed on the 'Work' calendar, just edit the line to say:
    set theEvent to the last event

  • Shutting down after certain time

    I would like to use my mac to listen to before I go to sleep. Is there a function where I can set the computer to go to sleep after half an hour or so after I decide, not a set time every night? Maybe there is a widget or something, I know there is one for going to sleep, is this the best I can do? Cheers

    Hi again:
    (Chuckling at myself), that is very true!
    As you know, you can tell the computer to shut down on a schedule (energy saver), but I do not know of anything that would do what you want.
    Barry
    P.S. I hunted a bit, but could not find anything relevant (other posts).

  • Internet goes down at certain times

    My Interenet has been going out at the same time every night around 11pm -12am. I also have phone service through comcast which also obviously goes out. It does not come back on for hours. I work from home and teach classes on the internet. This is REALLY a problem. I have called numerous times in the past months and had a tech come out with no solution. I try to send a refresh and it ALWAYS fails. It has even failed when the Customer Service Rep assists. I am thinking about replacing the box. If this does not help I will change my service. I have had Comcast in a different city in the past and never had these issues. FYI: My Cable TV always works fine.

    Please give us more information:
    1) Please connect your computer directly to the modem via Ethernet ( no router, no wireless, no USB )
    2) Run ShaperProbe and post your results. (It works with Win 7)
    3) Post your upstream and downstream signal levels (click the link.) We are interested in your power levels (dBmV) and your Signal to Noise Ratio (SNR).
    4) Let us know to what speed tier you subscribe.
    5) Post the make a model of your modem.
    6) Post your modem's error logs.
     

  • Firefox drop down not allowing page redirect is preventing me from auto running and installing software

    When I try to install software, Firefox window opens with a drop down box stating Firefox is not allowing page to re-direct. I click on allow, and it goes back to original page. It is preventing me from auto run and installing software. I tried several times, and it just runs me in circles. When I click to allow page re-direct, I click auto run and it send me right back to Firefox page with same thing. Very frustrating.

    When do you get this redirect?
    Is that when you (try to) visit other websites?
    Clear the cache and the cookies from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    You can look for suspicious extensions.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Do a malware check with some malware scanning programs on the Windows computer.<br>
    Please scan with all programs because each program detects different malware.<br>
    All these programs have free versions.
    Make sure that you update each program to get the latest version of their databases before doing a scan.
    *Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
    *SuperAntispyware:<br>http://www.superantispyware.com/
    *Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
    *Windows Defender: Home Page:<br>http://www.microsoft.com/windows/products/winfamily/defender/default.mspx
    *Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
    *AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
    *Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
    You can also do a check for a rootkit infection with TDSSKiller.
    *Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • [Solved] Simple auto-suspend script?

    I'm looking for a simple solution to auto-suspend (ram/disk) a system after a certain time of inactivity. I can find surprisingly little info for this for linux (or perhaps i'm not looking in the right places), while windows for instance has this built in for years already.
    The idea is simple but maybe tricky in practice; if there is no user input for x seconds, no video/audio playing or continuous disk/network usage, suspend the system. Basically the system just needs to be idle for a certain amount of time.
    Does anyone know or have a working script or utility for this, or is writing one myself the only solution? The simplest approach i can think of is a combination of checking user idle time (with 'w') and sysload, though it might be necessary to determine a threshold for the latter to avoid simple jobs (cron etc.) producing a 0.01 sysload and thus preventing suspend.
    Any other thoughts or suggestions about this?
    Last edited by litemotiv (2010-05-07 11:03:55)

    Sorry for hijacking your thread but I tryed sleepd to suspend and lock my screen after a certain amount of time. So far it's working smoothly except when I am watching something with xbmc.
    So I just set --load=1 in /etc/conf.d/sleepd but it still goes to suspend. And I verified with the key o in xbmc that the cpu load is higher than 1%. I also added "-N" as sometime I let my computer download stuff for me in the background.
    PARAMS=("--unused=600" "--ac-unused=600" "--load=1" "-N" "--sleep-command=su lymphatik -c slock & dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0" "--battery=2" "--hibernate-command=dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate int32:0")
    Last edited by lymphatik (2010-05-01 12:56:42)

  • KODI/XBMC auto run and script problems?

    I started a project a couple weeks ago to build a htpc using xbmc/kodi. I wanted to be able to play retro and steam games. So I've installed emulationstation and steam. Now comes the tricky part (for me anyways), writing bash scripts to access the programs through Advanced Program Launcher. Once I finally got that set up, I set the computer to login automatically and to auto run kodi. And here's where the issue happens. Normally when I run the simple script below, it closes kodi, and opens the program (so only one program is running at a time). However if I try to access the program from the auto-run instance of kodi, it doesn't close kodi before running. Instead, it opens the program and then opens another version of kodi. So if I press alt-tab it shows "kodi/emulationstation/kodi", so I have 3 programs open instead of 1 and trying to close any of them starts a cycle of new instances opening that causes a crash....
    #bin/bash
    killall -9 kodi.bin
    emulationstation
    kodi &
    So since everything runs fine when I start kodi by hand (icon and terminal), I'm assuming the problem is the way I'm auto starting the program? I've used the autostart section under the LXsession configuration, trying @kodi and @lxterminal -e kodi but both produce the same problem. Is there another/better way to autostart a program that I can do this? Or do you guys think it's an issue with the script?
    Thank in advance!!
    I'm running Arch 64 bit with the LXDE desktop.

    How do you autostart kodi ? By enabling the service ?
    In that case killing kodi would make it restart.

  • Auto run a script in a .app build?

    I have an applescript studio project that has two scripts. I want one of the scripts to autorun when the .app is opened, is there anyway to accomplish this easily?
    TIA
    Dave

    Where to I enter the
    All you need to is adding run script "so:and:so"
    inside the handler.
    Yup, inside the on awake from nib handler
    BTW.... when I click "edit" the inspector goes away?
    Yup, it switches to XCode, so you can edit the script.
    Now, it can be pretty simple, but it's depend on how you structure you project, to be more exact, on where you keep your scripts. Because you need to get the path to script in order to run it. Here is my example:
    tell me to (run script alias (POSIX file (path for script "base64_unicode" extension "scpt") as string))
    path for script return the path, but your script has to be in the Scripts folder of your XCode project.

  • Application auto run

    I have write a application in C language,and I want it could auto run with os boot. I write a start script, placed it in the directory /etc/init.d. There also I created a hard link in the directory /etc/rc3.d, and the link file named "S99XXXX", but the app can not auto run, what is the wrong with?
    Thank you!

    I think that having the startup script (or link) for your app in the /etc/rc3.d is a good idea. This will let you boot to run level 2, have all your network services running, but keep your app down. Makes things easier for testing/patching/whatever.
    To answer your question though, I'd try to run the script by hand. Check various for permissions (read and execute) and ensure that you have any needed environment variables set at the beginning of the script. These variables have bit me pleanty of times.
    As you probably know, your script will get run with a "start" option. Hopefully, your script isn't expecting a different option.
    My 2 cents.
    Good luck!

  • Script To Shut Down a Program At A Certain Time

    Hi guys,
    Unfortunately I have absolutely no knowledge of scripts so that's why I'm asking help for something which is probably simple.
    I run a torrent program and I wish do quit it at a certain time when I am not around. Now, when you close the program, if there are transfers running it brings up a dialog box asking if you really wish to shut the program down. The torrent program is Transmission.
    Is there any way that I can write a script to shut the program down for me?

    I think you will need to do something with at
    so to kill foo.app at 9 am
    enter
    at 0900 killall foo.app
    from a terminal

  • "Run Scripts" giving a problem to create portal domain

    Hello All.
    I am new to weblogic portal development. Was trying to create my basic sample portal in weblogic_portal_10.3.4 with the help of documentation. I am getting in running scripts when I was creating the domain. I have followed the below steps, please help me if you find any issue with my steps.
    1. downloaded Weblogic_Portal_10.3.4 and installed in my windows 7 environment.
    2. launched eclipse for weblogic portal.
    3. opened portal prospective in eclipse.
    4. right click on server tab and selected "Oracle WebLogic Server 11gR1 (10.3.4)"
    5. opened "Domain Configuration Wizard"
    6. Selected "Create a new Weblogic domain" radio button.
    7. in the next screen for "Generate a domain configured automatically to support the following products"
    selected "Weblogic Portal 10.3.4" radio button
    8. in the next screen given the domain_name
    9. in the next screen provided the password/confirm-password for administrator user
    10. in the next screen selected JRocket SDK and development_mode for my domain.
    11. in the next screen just left all the default configuration for the datasources. ( non of the datasource is selected in their check boxes)
    12. in the next screen just clicked on "Next" button and "OK" on my popup
    13. in this screen "p13nDataSource" is selected on my left top window area, All 3 SQL Files are selected for loading database.
    Clicked on *"Run Scripts"*
    At this point i am getting an error saying : "CFGFWK-60839:  Database Load Failed!"
    java.lang.Exception: SQLException when executing file file:/C:/Oracle/Middleware/wlportal_10.3/p13n/db/derby/seq_drop_tables.sql
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:183)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    Caused by: java.sql.SQLNonTransientConnectionException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
         at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         ... 1 more
    Caused by: org.apache.derby.client.am.DisconnectException: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect.
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:273)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1674)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:529)
         at java.net.Socket.connect(Socket.java:478)
         at java.net.Socket.<init>(Socket.java:375)
         at java.net.Socket.<init>(Socket.java:189)
         at javax.net.DefaultSocketFactory.createSocket(SocketFactory.java:206)
         at org.apache.derby.client.net.OpenSocketAction.run(Unknown Source)
         at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
         at org.apache.derby.client.am.Connection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
         at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
         at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(Unknown Source)
         at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
         at com.oracle.cie.domain.jdbc.JDBCConnectionTester.createConnection(JDBCConnectionTester.java:272)
         at com.oracle.cie.domain.jdbc.JDBCDataLoader.load(JDBCDataLoader.java:154)
         at com.oracle.cie.wizard.domain.gui.tasks.JDBCConfigGUITask$LoadDatabaseThread$1.run(JDBCConfigGUITask.java:1673)
    CFGFWK-60839:  Database Load Failed!
    Please help me if you find any problem with the steps that I am following to create my weblogic_portal_domain.
    I was following the steps mentioned at : http://docs.oracle.com/cd/E15919_01/wlp.1032/e14252.pdf to create my domain to start portal development.

    Those are the WLP 10.3.2 instructions. But, the 10.3.4 instructions in the tutorial (http://docs.oracle.com/cd/E26806_01/wlp.1034/e14252/setup_dev_env.htm#i1014619) are wrong, too.
    In 10.3.4, with derby, Run Scripts doesn't work any longer; it should still work the other database (Oracle, SQL Server, etc.). Instead, for derby, just create the domain, accepting any warning dialogs about databases that come up. After that finishes, in the domain directory, run create_db.cmd (on windows) or create_db.sh (on *nix and Mac). It should create the derby database files in the domain, and include everything needed.
    I'll send a note to get the docs updated.
    Greg

  • Not run script in policy

    hi i have a bach file run .bat
    this is in network \\dc\data
    but wen run this file of this way , not run
    i must map this way and run it to correct
    now i create setup.bat  and it whole
    ======
    net use  t: \\ dc\data
    t:
    call run .bat
    ====
    when run setup.bat, map t, and run corect
    now i create a policy and in script shutdown place the file setup.bat
    but when shutdown pc,the shut down is very time and script not run
    of corce a later 6 moon befor update windows , this policy work ok
    ploease help me

    no body to help me

  • Run scripts on a schedule

    Is the a way to run scripts on a schedule? I have a script that I want to run 3 days (Mon, Wed, Fri) a week at a certain time.
    How can I do this

    lets use iCal seeing as it came with your mac.
    create your script and save it where ever you want, open iCal create a new event, on the right hand side you will see the new events draw, set the time you want your script to activate in the from-to area, set it to repeat and end as you wish, go down to alarm and select open file in the drop down, then right below open file their should be another drop down select other from that, that will open a window now select your script, then in the next drop down select on date, your done.
    let me no if you need any more help.
    Budgie

  • Run script action - ZCM edits my script's content

    Good day,
    I am implementing a script in a bundle that allows me to generate files on the fly and execute them. Upon saving my "run script" action, ZENworks takes on himself to parse and edit my script, I am not sure why.
    A part of my script generates a .hta file, an html application, that is used as a temporary splash screen. For some reason (line 85) my event name (Windows_onLoad()) is renamed by ZENworks like this :
    oFile.WriteLine " Sub Window_onload()"
    becomes
    oFile.WriteLine " Sub Window_<body <body <body <body <body onload()"
    Does that ring a bell for anyone?
    I have other means of doing what I want but I wanted to bring this specific issue to you. Let me know what you think.
    Thank you!
    Action parameters :
    Code:
    Script to run : 'Define oyur own script'
    Script content : *copy of the script found below*
    Script file extention : .vbs
    Path to script Engine : C:\Windows\system32\wscript.exe
    Executable security level : Run as dynamic administrator
    Requirements : Registry Key and Value exists
    \HKEY_LOCAL_MACHINE\SOFTWARE\Lafleche\ZenworksAssignedObjets - Inst-Coba-x64 - NO
    ZENworks Agent : 11.2.2.121992 & 11.2.3.18535
    ZENworks version : 11.2.3.0
    Code:
    set oFSO = CreateObject("Scripting.FileSystemObject")
    set oShell = CreateObject("WScript.Shell")
    strFileName1 = Replace(oFSO.GetTempName,".tmp",".reg")
    strFileName2 = oFSO.GetTempName
    strFileName3 = Replace(oFSO.GetTempName,".tmp",".hta")
    set oFile = oFSO.CreateTextFile(strFileName3)
    oFile.WriteLine "<!DOCTYPE html>"
    oFile.WriteLine "<html>"
    oFile.WriteLine " <head>"
    oFile.WriteLine " <title>Title</title>"
    oFile.WriteLine " <HTA:APPLICATION Caption=""yes"" SysMenu=""yes"" />"
    oFile.WriteLine " <script language=""VBScript"">"
    oFile.WriteLine ""
    oFile.WriteLine " Sub Window_onload()"
    oFile.WriteLine " "
    oFile.WriteLine " window.resizeTo 500,250"
    oFile.WriteLine " "
    oFile.WriteLine " strComputer = ""."""
    oFile.WriteLine " Set objWMIService = GetObject(""winmgmts:\\"" & strComputer & ""\root\cimv2"")"
    oFile.WriteLine " Set colItems = objWMIService.ExecQuery(""Select * From Win32_DesktopMonitor"")"
    oFile.WriteLine " "
    oFile.WriteLine " For Each objItem in colItems "
    oFile.WriteLine " intHorizontal = objItem.ScreenWidth"
    oFile.WriteLine " intVertical = objItem.ScreenHeight "
    oFile.WriteLine " Next"
    oFile.WriteLine " "
    oFile.WriteLine " intLeft = (intHorizontal - 500) / 2"
    oFile.WriteLine " intTop = (intVertical - 250) / 2"
    oFile.WriteLine " window.moveTo intLeft, intTop "
    oFile.WriteLine " idTimer = window.setTimeout(""PausedSection"", 8000, ""VBScript"")"
    oFile.WriteLine " "
    oFile.WriteLine " End Sub"
    oFile.WriteLine " "
    oFile.WriteLine " Sub PausedSection"
    oFile.WriteLine " window.close"
    oFile.WriteLine " End Sub"
    oFile.WriteLine ""
    oFile.WriteLine " </script>"
    oFile.WriteLine " </head>"
    oFile.WriteLine " <body>"
    oFile.WriteLine " "
    oFile.WriteLine " <img src=""http://www.domain.com/logo.png"" alt="""" />"
    oFile.WriteLine " "
    oFile.WriteLine " <p>Installation underway...</p>"
    oFile.WriteLine " "
    oFile.WriteLine " </body>"
    oFile.WriteLine "</html>"
    oFile.Close
    oShell.Run strFileName3, 0, true
    'oFSO.DeleteFile strFileName3

    Hi All, we now have the same issue. running 11.2.4 MU1 tested on IE8 on XP, IE9 on Win7 and ff 17esr, and suse 12.3 with chrome 31... want us to try ie 10 and 11? currently updating to ff 24 esr, and will update IE to 10 for now.
    Currently we have the exe defined as "c:\windows\system32\mshta.exe", .hta extension.
    Trying to validate the syntax externally, if anyone has any suggestions. Encrypted within the script the app runs fine.
    issue is the <body being added, up to several times:
    "Sub Window_<body <body <body onload
    Window.ResizeTo 590,560
    Continue
    End Sub"

  • HELP! adobe reader XI (11.0.09)  hangs on installation (running scripts package)

    adobe reader XI (11.0.09) hangs on installation (running scripts package). I cannot shut my computer down, because the installer won't let it and says "interrupting the install will damage the computer) I just wanted to update from 11.0.07 but it said contents had been changed so I had to reinstall adobe reader. So I am trying but it has been hours.

    Hi andrea02,
    Are you still facing this issue?
    You may try uninstall previous installation copy using Adobe Acrobat/Reader cleaner tool::  http://labs.adobe.com/downloads/acrobatcleaner.html
    Regards,
    Ajlan Huda.

Maybe you are looking for

  • Shared Services Configuration : Database type

    Hi all, i installed essbase and couldn't connect to sql to load the data into essbase( though it works fine with excel and text file) after numerous pondering on the forums I could not find a solution to my probelm why i could not connect to sql from

  • Itunes wont update on pc

    When trying to update my pc with windows 7 to the latest software update on itunes, it goes through the installation process and then I get a pop up that says Itunes cannot update because a program cannot open. contact support. any idea what needs to

  • Need information on the very first certification exam - PL/SQL

    Hi all, I am about to enter the OCA track. Need to appear for the very first exam. Please let me know somethings like - 1. begineer's book, and pdf with any one, please pass it to [email protected] 2. what is the name of the certification guide ? 3.

  • OVP Overview Page Floorplan (ABAP Webdynpro)

    Good Day all, I am working on OVP and my question is: I have 3 radio buttons and 2 dropdown list in header, when user select particular radio button the list should appear depend on this radio button. for example I have radio buuton called 1 and the

  • WRV200 PPTP WAN - Default GW is not pointing to tunnel

    Hi all, I am currently testing this WRV200. We have a PPTP server serving IP range from 192.206.59.1/24 There is no problem with the authentication and tunnel establishment. Just that after the tunnel is established, the default gw in WRV200 is not p