cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
501
Views
0
Helpful
3
Replies

CSS 11503: cmd-sched and play script

casablancag
Level 1
Level 1

Hi

I wanna to write a script that automatically backup my configuration to a ftp-server. If a play the script from the console it works fine, but if a write a cmd-sched then it doesn't work. The Variable UGREP is not recognised and the USER that playes the script is rcmd-sched.

*******

show profile | grep -u "@prompt"

echo "${UGREP}"

set HOSTNAME "${UGREP}[2]"

show ver

show clock | grep -u "Date"

set DATE "${UGREP}[2]"

set FTPSTATE "${HOSTNAME}_${DATE}"

copy running-config ftp SAVE_CONF_FTP ${FTPSTATE}

********

3 Replies 3

jnorman
Level 1
Level 1

try the command from the user that the script works for:

copy profile default profile

I had this issue when I wrote an alias and it wouldn't run in the cmd-sched.

The command works fine when I start it from the user context. IT doesn't work when it runs in the cmd-sched.