Hi, I have an element created with a Timed Action wich should be executed every 4 hours,but I see that everytime I connect with the element these QAction (and others) are also executed. Is theree any way to avoid these QActions to be executed on Element Connection?
Thanks
thanks Thijs! that was the point, I had a datadisplay option set on the timer, deleting it solve the problem.
regards
Great to hear that resolved your problem. I'll create an answer with my comment so we can close this item! Glad I could help!
Hi Jesus, The behavior you describe doesn't sound normal. Opening the element connection should by default not impact the execution of your timer group. Therefor my initial guess would be a wrong configuration or usage.
As confirmed via the comments, in your case you had configured the DataDisplay option on your timer configuration. This would by design increase it's execution frequency when the elementcard is open.
Removing this option should give the expected result you were aiming for.
Note that if you want to fully "fix" the timer speed, and not allow modifications via the Timer Base configuration (Changing the polling speed of an element | DataMiner Docs), you can define the option FixedTimer. Please see fixedTimer attribute | DataMiner Docs.
When it's critical that the action is not being executed more frequently than every 4 hours, I would also recommend to store the last execution time in a parameter, and comparing it with the current time during the next execution. Otherwise the action would still be executed on, for example, an element restart.
I agree with Tom. To strictly adhere to the 4-hour interval, it's best to save the time of the last execution in a parameter and compare it during the next execution. However, keep in mind that your timer should run at a faster interval to avoid missing the 4-hour execution window. For example, if the element restarts, a faster timer will ensure the check occurs promptly, preventing any gaps in execution.
Hi, The behavior you describe doesn't sound normal. Could you please elaborate your question and include how your timer is defined in the protocol XML please?
Opening the element connection should by default not impact the execution of your timer group. Therefor my initial guess would be a wrong configuration or usage. Could it be that you configured the "DataDisplay" option on your timer? This would by design increase it's execution frequency when the elementcard is open. (https://docs.dataminer.services/develop/schemadoc/Protocol/Protocol.Timers.Timer.Time-dataDisplay.html)
Extra note: the time you define on your timer is defined in milliseconds.
Looking forward to some extra context, then we should be able to get you forward easily. Thanks!