Got another one for you: This is Mango V4.5:
It looks some of our scripted data points are running despite not having anything set to make them run. There's a a lot of backstory on this- Originally, I wanted something to run every 10 minutes- Thus, I set up a scripted data source to run every 10 minutes.
This data source does some things, and then sets another point (which is used by the next "step" in the process) to do more calculating; That data point is set in that script to "update context" in the next script.
Correct my understanding here, but, for the sake of this post:
"Updates context" in the world of mango scripting / metapoint means "If this value updates, run this thing. If this value doesn't update, no need to run this thing", according to the setting of the "context update event" box in the data source (update, logged, or change). If you don't have any points selected to "update context" in the points in the script, then that drop down doesn't have any effect; Is that right?
"polling" in the world of Mango scripting means "Do this thing based time settings, either every XX minutes or as a cron pattern"
If you do polling and have "updates context" points selected, then it should do both (run on the Polling time and run when the point updates within the script).
What I have are points that run with no context and no polling enabled. My original script should run every ten minutes- meaning, every 10 minutes, the script should run, do some stuff, and use the set directive to make the next "step" work in this set of chained calculations. That original scripted point should then wait 10 minutes before Doing Thing again, and restarting the process.
Our little thing is working, but it's running continuously, and doesn't seem to care about the settings of the "polling" box (currently set to off, but the script is still running) or the "updates context" checkboxes in the data points in the script (all are "unchecked").
I've noticed this quite a lot in behaviors in my scripting: I generally thought that the script would run under the conditions above (timers, based on CRON or the time setting) and / or the "updates context" next to the points in the script, as informed by the "context update event".
It appears that the scripts are running effectively continuously: This means that in practice (regardless of the settings I have for "polling" or "context updates") I need to bracket my code with "If (somedatapoint.value == true {stuff}" to keep things from updating on their own.
So what am I missing here? I want this thing to run every 10 minutes, let the cycle complete, then stop and wait for the cron (or timer setting) to restart the task 10 minutes later. Instead, it's just looping through endlessly, as if I had "updates context" selected for all the datpoints in the scripted data source.
I've attached a screen grab of one of the points in question- What setting here would indicate to you that this should run effectively constantly?
The script in that scripted point is running, and appears to be updating as if any point updates, despite none of them being checked to "update context". Have I been using "update context" wrong the whole time so far?
If so, how do I get a Mango scripted data point to run, then just sit there and do nothing until the next 10 minute interval elapses. I thought that's what "polling enabled" with either "update period" or "cron pattern" would do?