In ROS 3.5 my scripts now run - I can’t vouch for everyone in userland but mine with functions such as || and && do work as well as calling other scripts from within a script and accessing global variables from within those scripts (redefined in the scripts as global - :global XX) seem to work correctly when being called from the scheduler.
What has me bothered is two things in the scripting engine.
When the scheduler runs a script that defines global variables if you do a " /system script enviroment print " you’ll see the variables listed as *sys GLOBAL NAME. If I run a script (not the scheduler) as admin it does not work - there are no global variables available to my user even though I reference them in the script like so :global XX 5. However if I initialize the globals under my user profile, say admin, then run the script it will work. Also when I do " /system script enviroment print " you will now see the global variable listed twice, once as user *sys and once as admin.
This looks like an issue with chroot in a linux kernel… I also do not know if you (MT) consider this a feature or a bug…
Scheduler and script counters… Feature or bug? When I run ‘events’ via the scheduler - the scheduler counter increments but not, in my case, the script that is being called, it’s counter remains ’ 0 '. I know the script has run because I can cause it to do something if one or more conditions are not met - failover for a dual WAN gateway in this case.
Part two for this is if I run the ‘main’ script that puts my failover scripts in to action, that script counter will now increment ( ‘main’ ), however, the other scripts that ‘main’ calls, their counters do not increment…
Again - this looks like an issue with chroot in a linux kernel… I know MT ROS is based on Linux, just thought you should be aware of what this looks like…
The last thing I noticed - if you watch the ‘jobs’ tab under Winbox, when the scheduler runs a script the script name comes up as ‘unknown’ - rather curious…
I know it is so - the first section. What I want to know is it suppose to be that way AND is it going to stay that way.
I have admins that work for me that do not have privilages to do some things - the scripts ‘output’ information they can use without the necessity of giving them access to all functions…
In ROS 2.9 global was truely global - now the ‘global’ variables are not necessarily global… It seems more like a bug than a feature to me. Which - if it is going to remain so, I will have to re-write several scripts with the new ‘global’ non-global feature in mind…if this is a bug, then I will wait.
hmmm, if changes were all documented well it was maybe not such a big deal. But if we have to check and debug the scripts each time the scripting language change without prior notifications I would not call that ¨not a big deal¨. It gave some of us loads of work, on a production network!
Anyway, as an add on, or probably related issue to, this tread:
the same counters galaxynet refers to can´t be reset to ¨0¨ by any means.
Even after a reboot with a newer ros version the counters stay as they are. But in debugging it would be very handy if we can reset the counters to see if the scripts do run or not.
Maybe MT can take a look into this as well if they are looking at the other mentioned issues.