DX NetOps

  • 1.  Schedule .sh file in Windows

    Posted Apr 14, 2015 03:04 PM

    I have a scipt (.sh file) that exports a list of devices in Spectrum to a text file that I can launch from a bash session however I would like to schedule this to run via the Windows Task Scheduler.  Any suggestions on how to do that.



  • 2.  Re: Schedule .sh file in Windows

    Broadcom Employee
    Posted Apr 14, 2015 03:15 PM

    Skip,

     

    Just a wild guess, but I presume you can create a bat file wit a bash -c statement in it and schedule this one. I am sure there are better experts in this than me, but I would expect this will work.

     

    Rgds,

     

    Todor.



  • 3.  Re: Schedule .sh file in Windows

    Posted Apr 15, 2015 05:02 AM

    Have a look here, it may help you out

     

     

    http://stackoverflow.com/questions/19285809/cgywin-sh-file-run-as-windows-task-scheduler

     

    Regards,

     

    Simon Sage | Telefónica UK Limited

    OSS Engineer

    O2 Unify Technical Services

    M +44 (0)7767 237077

     

    Joined Up Business from O2

    www.o2.co.uk/enterprise<http://www.o2.co.uk/enterprise>



  • 4.  Re: Schedule .sh file in Windows
    Best Answer

    Broadcom Employee
    Posted Apr 15, 2015 05:55 AM

    Hi Skip,

     

    you might run the script without launching bash:

     

    list.bat:

    --------------------------------------

    connect.exe

    show.exe devices lh=%1 > list.txt

    disconnect.exe

    ---------------------------------------


    Just launch it this way : list.bat [lanscape handle], i.e.list.bat 0x100000.

     

    Hope this helps


    David