Scripting Bug in 2.9.5???

Hi Guys,

I wrote a script in 2.9rc9, it worked fine up until about 2.9.3 or 4, when it started acting strangely. It seems to work sometimes, but not all the time.

The Line That is failing is:

:local emailSubject ("KP WDS UP        " . $thetime . " " . $theDate . "Total Down Time: " . [/system clock get time] - $downtime)

Other Variables:

:global downtime [/system clock get time]
:local thetime [/system clock get time]
:local theDate [/system clock get date]

The downtime variable is set when it goes down, and when it comes back up the line above is run. This was working fine, but now fails almost every time.

Obviously the result should be the difference in time between the two times to give total down time.

Any suggestions?

Try using a global variable for everything. See if that helps or not. It seems I had problems with ‘local’ - probably me just understanding what the scope of local is.

Sam

Hi Sam,

That doesnt make any difference, the two local variables are declared right above the line thats not working, so they should be in local scope.

I did try it, but it doesnt work.

I am obviously not being stupid here, what I am doing should definately work right?

The biggest issue is that this now stops all our reporting for when AP’s go down, so its a huge issue at the moment.

For me scheduler is not working good in 2.9.5 on all rb532 stations i have …

Jan

its not a problem with scheduler, scheduler is fine.

its a problem with the comparison between dates.

I am suprised that a mikrotik admin has not mentioned if this is a genuine bug or not, as it definately appears to be.