This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to schedule a script (crontab)

Hi everybody,

is it possible to schedule a custom script (can't find crontab command from advanced shell) ?

Thanks

--Antonio P.



This thread was automatically locked due to age.
Parents
  • I'm using an expect script running on my Linux box to reboot the XG nightly ... works well:

     

    #!/usr/bin/expect -f
    spawn ssh <XG IP> -l admin
    expect "password:"
    send "<Admin Password>\r"
    expect "Select Menu Number \\\[0-7\\\]:"
    send "7\r"
    expect "Shutdown(S/s) or Reboot(R/r) Device  (S/s/R/r):  No (Enter) >"
    send "r\r"
    expect eof
    exit

  • Hi Vik,

    sorry for the late answer but you don't need to use expect for this - simply use 

     

    ssh <XG IP> -l admin /bin/sh reboot

     

    If you call directly command /bin/sh it works and you skip the whole menu. If you try it without a reboot, it looks like it doesn't but don't blame yourselves :D It's a shell without prompt - type ls and push ENTER - you see? :)

    Best regards,

    Jiri

Reply
  • Hi Vik,

    sorry for the late answer but you don't need to use expect for this - simply use 

     

    ssh <XG IP> -l admin /bin/sh reboot

     

    If you call directly command /bin/sh it works and you skip the whole menu. If you try it without a reboot, it looks like it doesn't but don't blame yourselves :D It's a shell without prompt - type ls and push ENTER - you see? :)

    Best regards,

    Jiri

Children