cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
489
Views
10
Helpful
1
Replies

How to create cisco NSO scheduler?

himanss4
Cisco Employee
Cisco Employee

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.

1 Reply 1

himanss4
Cisco Employee
Cisco Employee

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.

configeditpag.png

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.

ncsservice.png

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