BUG in Netwatch script run?

Hi,

I’ve noticed that when I run script from terminal or schedulle and call a global variable from another script (e.g. if RoS is running on routerboard or not - :global routerboard [/system routerboard get routerboard]) i can get the value either true or false. But if I run a script from netwatch it ignores a global variable and I need to redefine it again. Otherwise the value is NULL.
Is this a bug?

br,

bysaRD

You need to define variable in script before using it.

Im main script variable is defined by:

:global routerboard [/system routerboard get routerboard]

in subscript:

:global routerboard;


I need to define :global routerboard [/system routerboard get routerboard] also in subscript otherwise its not getting the vaule. So it’s no difference if I just use local varibale.

If both script owners are not the same user then you will not see variables.

Netwatch script is run with ovner “*sys”, so you cannot see values set by script running in scheduler (where defautl owner is “admin”).

Thank you, that makes sense.