04-12-2022 11:54 PM - edited 04-13-2022 12:16 AM
I see https://community.cisco.com/t5/nso-developer-hub-documents/nso-scheduler-demo-pdf/ta-p/3640597 wich has attached pdf for scheduler implementation.
Also
https://developer.cisco.com/docs/nso/guides/#!scheduler
Same as PDF.
While implementing scheduler, i was seeing docs , initially was facing some issue, as its new for me. what is action_node , action name to be define and how to pass input?
I am adding screenshot and how it is implemented in below answer.
04-13-2022 12:11 AM - edited 04-13-2022 12:20 AM
This is common way to implement it.
After login to nso_cli
admin(config)# scheduler task run-my-schedule schedule "*/2 * * * *" action-node /ncs:services action-name check-sync
admin(config-task-sync)# action-params "<device>ios0</device>"
admin(config)# commit
Here what above command has used:-
scheduler task run-my-schedule -- this run-my-schedule is the name you give to scheduler
"*/2 * * * *" -- this is common corn job way to represent the time when it will execute (this shows scheduler will run in every 2 min). you can read corn job if you have not work in search engine(google , yahoo)
action-node /ncs:services -- this path you can take from configuration editor , i have taken services.
action-name check-sync -- This action name is action in that /ncs:services see below picture, same action also you can take from other modules also.If you have some custom action define in action package you can use that if you are running that action-node of that modeule.
action-params "<device>ios0</device>" -- this is input you can pass , if you have list of item you can pass multiple device , if you have only a string or only one list to pass you can define it here. for example if you have some input like string 'name', you can use <name>test</name>, it will take it as string
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide