Netwatch disable VLAN working intermittently.

Guys,

This does not make sense to me. It works one time (log file reports device changed), then when I test it again I get an output to the log file, script: no such item

I run a netwatch script to disable the connection to the hotspot router if the internet goes down:

Host 8.8.8.8
Interval 00:00:10
Timeout 1000

up
:log info “WAN1 is UP”;
/interface vlan enable vlan1000;

down
:log info “WAN1 is DOWN”;
/interface vlan disable vlan1000;

When it fails, if I go to the terminal and type in the command it works fine, every time. This only happens with netwatch.

Any ideas?

Cheers,
Cinders.
weirderror.jpg

Can anyone shed any light on this issue?

Try running this:

/interface vlan disable [find name=vlan1000]

Should be a bit more reliable at finding the interface.

Thanks for the reply Feklar. I’ll give it a try a bit later.