Automate NXSL Script [SOLVED]

Started by anw, April 02, 2016, 09:39:23 PM

Previous topic - Next topic

anw

Hi
i have written a tiny script for my switches - which changes the expected interface states to ignore, unless an alias/port description is set.
i would like to auto run it for all my switches every X hours - how can i realise that?  i dont really get the scheduled tasks - where can i define which script to run ? and what to enter into the cron schedule?

thanks guys


edit: thanks tomaskir, that was easier than i thought :)

tomaskir

Scheduled script is the functionality you are looking for.

1) make sure your user has access to the scheduler features (in user manager)
2) go to "Configuration > Scheduled Tasks"
3) create a new scheduled task
4) set type to "Execute.Script"
5) you can leave execution object empty, your script can then iterate all objects and execute on whichever you need
- this is of course limited by security policy as explained on this wiki page
- how to iterate over all nodes example on this wiki page
6) put the name of your script in the Script Library into the "Parameters" field
7) set cron schedule
- this is in standard cron format, if you dont know it, just google for "cron generator", for example this one