"If time, but only in month" problem



1) Give a description of the problem
I have a portion of a piston that does not interpret the “…but only in December” part. It is getting triggered at the right time but somehow fails this evaluation.

2) What is the expected behavior?
Piston is triggered each morning at 20 minutes after sunrise. The conditional at lines 44-49 should execute between the last week of November through the first week of January.

3) What is happening/not happening?
It is the month of December and at sunrise+20 minutes, line 47 is executing as false.

**4) Post a Green Snapshot of the piston!

5) Attach any logs (From ST IDE and by turning logging level to Full)
I will do this if there is not an obvious problem to the above (like monthly exception evaluation does not work).

Any thoughts on why this would not evaluate to TRUE?


I would be tempted to condense lines 44-56 to a single trigger. IE:


This one will only be true during the 45 days you wanted…

You can find the dayOfYear with this Expression:
formatDateTime($now, 'D')
(which returns a number from 1-366)



Thanks, I’ll give it a try and report back.

But just wondering, is my current logic not correct?


At a guess, time happens daily at ... trigger conditions need to be unique in the piston. Once the first of three identical ones matches the current time event the piston reschedules for the next day and the next two don’t match up. Or something like that.