cancel
Showing results for 
Search instead for 
Did you mean: 

Cron job

nbctcp
New Contributor III
I can't find anywhere on how to create a cron job which it will reboot the switch if I didn't cancel the job within 1hr
Any idea
tq
5 REPLIES 5

mitchell_axtell
Contributor II
How about reload after?

SSH@SW01#reload after 00:01:00
SSH@SW01#show reload
Reload will start 0 days 0 hours 59 minutes 55 seconds from now
from PRIMARY CODE FLASH
SSH@SW01#reload cancel
Scheduled reload cancelled
SSH@SW01#




nbctcp
New Contributor III
I should phrase correctly
This what I mean
Let say I create an alias RESTORE which will copy restore.cfg to startup-config in flash
alias RESTORE created and tested ok
I just need a cron job to run that RESTORE alias once after 1hr

mitchell_axtell
Contributor II
Batch commands have a schedule option- might suit your need:

SSH@SW01(config)#batch buffer 1 # RESTORE #

SSH@SW01# execute batch 1 after 00:01:00

your reply answer my problem here
https://forums.ruckuswireless.com/ruckuswireless/topics/icx-questions?utm_source=notification&ut...

STEPS
-to create alias
#conf t
#alias bkup=copy flash flash file startup-config backup
#alias restor=copy flash flash file backup startup-config

-to create a cron job
#conf t
#batch buffer 1 &
#restor &
#end
#execute batch 1 after 00:00:01
#sh batch schedule
Batch buffer 1 will be executed 0 days 0 hours 0 minutes 52 seconds from now
NOTE:
-can't put reload on batch
http://docs.ruckuswireless.com/fastiron/08.0.61/fastiron-08061-commandref/GUID-02AE6631-717F-4E29-92...

-to reload after 2min
#reload 00:00:02

Those steps achieve my goal but almost perfect because
1. I can't put reload in batch (see notes above), that's why I need to put batch and reload in consecutive order
2. will be better if I can copy backup to running-config directly
I can do that but not affect current running-confg
for example
current hostname SW1
wr me
copy startup-config to backup
change hostname to SW2
copy backup to running-config
those wont change my running hostname