How can I get this trigger condition to work?

15 views
Skip to first unread message

Dan Power

unread,
Jul 7, 2023, 3:16:13 AM7/7/23
to schedulix
Hello,

I am trying to get a trigger condition like this to work:
$EXPRUNTIME > $ACTIVE_TIME

Basically, I am setting Expected Runtime [Sec] to a value that I expect to always be lower than the Active Time so that I can detect when it has run way to sort of the time expected. Despite being able to capture good values through parameters:
 AT    RESULT  false  $ACTIVE_TIME
ERT  RESULT  false  $EXPRUNTIME

I cannot get the above condition on my trigger to work. If I change the condition to just true the trigger triggers just fine. So, there has to be something wrong with my condition. I suspect on of the values is not set correctly at the time the condition is evaluated but does get set correctly for the result parameters. Is this a function of the trigger type? How can I get this condition to work? I even tried to use the parameter names in my condition and it still does not trigger.



Dieter Stubler

unread,
Jul 7, 2023, 5:10:32 AM7/7/23
to schedulix
Hello Dan,

the problem arises because using string compare is used which makes 10 smaller than 9.
Explicitly cast  parameters like:
int($EXPRUNTIME) > int($ACTIVE_TIME)

This should do the job.

Regards
Dieter

Dan Power

unread,
Jul 7, 2023, 11:30:08 AM7/7/23
to schedulix
Thank you so much. That worked.
Reply all
Reply to author
Forward
0 new messages