I have uplaod it using FTP
and when the script is working (wihtout any mistakes)- I get “script upload success”
I want to get the errors to be wriiting also to the files if there is a problem
Very good. User should have all permision, like Full group. You can next experiment and create own group without necessery permition but remember after some upgrade RouterOS some rights can be change.
.
.
and when the script is working (wihtout any mistakes)- I get “script upload success”
I always put at end of script line to remove itself and this is confirmation for me the error not exist and last self destruction was done. This remove old .log who have old errors as regex script.auto* .
.
I want to get the errors to be wriiting also to the files if there is a problem
I just use /put in script body in some lines like chapters, this is printed in script.auto.log file and I can assume at what part error happens. You can put blocks of code into :do={} on-error={put “error1”} to have errors only if he exist.
.
put "Starting..."
put "Doint clean up..."
put "Starting action..."
put "The End..."
this is what I did
but if you have problem in the script
let say typo mistake or you try to change interface that isn’t there
(for example you try to change ppp-out interface phone nmber , and there is not ppp-out interfance …)
you will now know this , the script will get stuck
I want to be able to get the error that is printing in the log
thats why we must use a FIND operator.
We can use :do on-error={}
We can use print do debug problems.
But, when I create a new script then always I run it few times to check if it not create few times the same stuff.
Two differ scripts per few differ platform like wifi for old wlan1 only and second one who use wlan1 and wlan2.
That’s why at the end we can use a double-check monitor action what dev use for cron monitoring… if no request at the end of script then do alarm… some online project are like “Dead Man’s Snitch” but when you type “cron monitor” then you can get many of that services.