Clarifying Policy Action Relevance and Reapplication

Hey everyone,

I’ve been tinkering with a policy action lately, and I’ve come across an intriguing quirk regarding relevance and reapplication that I’d like to discuss.

Here’s the relevance condition I’ve set up:

if (((it + 13*day) of first Tuesday of month_and_year of current date) = current date and (hour_of_day of time (local time zone) of now = 23))

This condition checks if it’s the first Tuesday of the month and if the current time is 11 PM. If both criteria are met, the action should trigger.

However, I noticed that once triggered, the action doesn’t reapply for subsequent occurrences of the first Tuesday at 11 PM.



What is wrong i am doing here ?

Looping in @Deepakbatra Sir

IF statement-a is not correctly formulated… You can’t have IF (condition) and that’s it.; if you use IF statement you need the full statement: IF (condition) then (what to do if met) else (do something else)

That said, it’s a good thing that the above failed it because the way you have it it will enter very heavy repetitive loop that would last 60 mins and clients would be running the job all the time for those 60 mins… You need to write relevance in such way and play around with the reapply conditions so that this never ever happens! For example, if you are checking whether this is the Monday before the 3rd Tuesday of the month and the hour of day is 23, then I would put the job “Reapply this action while relevant, waiting 1 hour between reapplications”, so it matches your relevance, runs it then doesn’t start again for that hour…

If you are set to use this relevance then, use:

(((it + 13*day) of first Tuesday of month_and_year of current date) = current date and (hour_of_day of time (local time zone) of now = 23))

Also tied this -

if ((((it + 13*day) of first tuesday of current month_and_year)) = current date and (now as string contains "18:40")) then true else false

But the action did not triggered at 18:40 ( testes on two environment - on 1 environment it worked , but on 2nd the action did not triggered)

the requirments are - to schedule the action to create an action that will run on a specific day of week of a month at 18:40
And similarly another action executes after 4 hours.

1 Like

That second one, if it’s correct, would only remain relevant for one minute …

1 Like

Exactly, is there a better way doing this ?

This looks like a good explanation Relevance Statement For Time