Hi dude..
how can i add the script with the “” symbol?
in winbox we can copy and paste, but it’s not convenient as i prefer come out a master script then to suite for more faster configuration way.
Hi dude..
how can i add the script with the “” symbol?
in winbox we can copy and paste, but it’s not convenient as i prefer come out a master script then to suite for more faster configuration way.
Wrap the script in pairs of quotation marks ("), and escape every quotation mark inside the script.
http://wiki.mikrotik.com/wiki/Manual:Scripting#Constant_Escape_Sequences
" Insert double quote
Example:
/system script add name=test source=":put \"test!\""
This is pretty standard for any shell, anywhere.
Hi Fewi..
i have try this way…
system scheduler add name=Radio_Reboted_Notification disabled=no start-time=startup delay=1m on-event=(/tool e-mail send server=202.133.97.7 to=“bt.ang@mykris.net” from=“iGate_alert@mykris.net” subject=“$[/system identity get name] $[/system clock get time] $[/system clock get date]” body="The Router is Rebooted due to not able to reach Gateway, Please follow up)
but what i found is, it’s not working and no content in the “on-event” the delay time also cannot be set.
appreciated and really need an advice.
it seems that on-event do not contain any quotation. That might have worked before, but 5.x requires stricter syntax. So try to add quotation and check results.
How can make this work and in the V5, there is no delay setting as well.
there is
:delay <seconds>
as in previous versions.
in Scripting manual on wiki is described latest RouterOS
Dear janisk …
I have successfully to make it..
But some how, the script will auto convert the value into my system scheduler.
this become another issue that, when i change the system information or some other value later on, it not able to update the system scheduler.
how can i make it, in the new terminal, the script i paste that, in the system scheduler, it will show something like “$[/system identity get name] $[/system clock get time] $[/system clock get date]” instead of auto-convert it to the system value into the system scheduler.
if you have entry already, you have to remove item with that name to add it again. Or you have to alter script to change config, not to add.
i think i have mislead..
what i mean is, when i paste "$[/system identity get name] " in the new terminal, inside the system scheduler on-event, it will shown "$[/system identity get name] " instead of the “system name”
how can we make it?
thanks.
"$[/system identity get name] "
Hi…
Yes, i did that, but that will not auto update if there is any system information changed.
i would like to make it after paste the script in the new terminal, in the system scheduler on-event will shown the script as B instead of A.
Thanks.