Script error

Hi,

I have problem with script scheduler, when I run script manualy it run correctly but when I run it via scheduler script place this error to log :
script error: input does not match any value of item name …
Can anyone help me with this ?

Script is :
:if ([/system scheduler get changeipJob2 run-count]<=1) do={ /system script run changeipInit2 }
:global temp2
:global c
:set temp2 $d
:set c [:resolve xxxx.dyndns.org ]

:if ($temp2 != $c) do={
/interface l2tp-client set L2TP-ISP_MAIN connect-to=[:resolve xxxx.dyndns.org]
/interface l2tp-client disable 0
/interface l2tp-client enable 0
:set d $c
}

and second script (changeipInit2) is :
:global d
:set d [:resolve xxxx.dyndns.org ]

Thanks for ideas

/Tomi


Thanks for ideas

/Tomi

the error is where you are disabling/enabling l2tp-client - you can’t use numbers assigned with a ‘print’ command, use internal ones instead.

Edgars

thanks for idea :slight_smile:


/Tomi

but… I change ,0, to ,L2TP-ISP_MAIN, but in logs the same error…

It is required when I change IP address of L2TP server in client to enable/disable interface to reconnect ? or change IP is enough ?


/Tomi

you have to perform also disable/enable.

Edgars

any ides where can be a problem with error in log file ?
(script error: input does not match any value of item name)

:frowning:

/Tomi

maybe there is a typo writing the scheduler task name or l2tp-client’s one. Try to check that.

Edgars

problem resolved :slight_smile:

I have two scripts with similar name :
changeipInit and changeipInit2 and the same checkip and checkip2, one script send email when public IP is changed and second script change IP addres of L2TP client, when runs both scripts, error in log is present. I merge both scripts to one and work correctly :slight_smile: ?@?@?!!!?!

thanks for ideas

/Tomi