:~/config_ff$ cat tclsh_vlan1-noshu.tcl
ios_config "interface vlan1" "no shutdown"
:~/config_ff$ cat tclsh_vlan1-shu.tcl
ios_config "interface vlan1" "shutdown"
:~/config_ff$
CORE#dir
Directory of bootflash:/
73021 -rw- 40 Dec 6 2024 05:44:58 -05:00 tclsh_vlan1-shu.tcl
73022 -rw- 43 Dec 6 2024 05:45:04 -05:00 tclsh_vlan1-noshu.tcl
1700155392 bytes total (868392960 bytes free)
CORE#conf t
CORE(config)#kron policy-list test-run
CORE(config-kron-policy)#cli tclsh bootflash:/tclsh_vlan1-shu.tcl
CORE(config-kron-policy)#exit
CORE(config)#kron occurrence applychange at 6:35 oneshot
CORE(config-kron-occurrence)#policy-list test-run
CORE(config-kron-occurrence)#end
CORE#show kron sch
Kron Occurrence Schedule
applychange inactive, will run once in 0 days 00:05:14 at 6 :35 on
CORE#sh run | b kron
kron occurrence applychange at 6:35 oneshot
policy-list test-run
!
kron policy-list test-run
cli tclsh bootflash:/tclsh_vlan1-shu.tcl
!
CORE#conf t
Enter configuration commands, one per line. End with CNTL/Z.
CORE(config)#no kron occurrence applychange at 6:35 oneshot
CORE(config)#end
CORE#show kron sch
Useful links:
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ios_tcl/configuration/15-mt/ios-tcl-15-mt-book/nm-script-tcl.html
https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/93x/progammability/guide/b-cisco-nexus-9000-series-nx-os-programmability-guide-93x/b-cisco-nexus-9000-series-nx-os-programmability-guide-93x_chapter_0100111.pdf
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cns/configuration/xe-16-6/cns-xe-16-6-book/cns-cmd-sched.pdf