[2.3.2.139 C-7] Variable Time Trigger not firing

I created a rule that should fire based on time in a variable, but it doesn't do that. Nothing happens and there is nothing in the log.

It's not created an event subscription either.



I was able to get an event subscription on the variable when I edited the app and opened them saved the trigger and clicked "update rule" in the app prior to the time in the variable.

This time, it fired.

I was going to ask if you hit "Done" (or "Update Rule"--same thing except it keeps you on the rule page) after creating that trigger. Trigger subscriptions won't get updated if you don't. I tried a new rule and it worked for me. Glad it does for you!

I'd obviously hit done several days ago when I created that rule the first time.

@bravenel
The problem appears to be when you create the rule trigger on a variable time and the variable contains a "past" time as the rule trigger is first created.

In that situation, no event subscription is made

You have to update and save the rule and trigger with a FUTURE date in the variable to get the event subscription created properly, it appears.

LOL. First time I've heard of a rule not working because of this.

This is only the case if you use the Date option in 'Certain Time (and optional date)' with a past date and did not select Annually. If you don't try to schedule something in the past, it works as expected. It throws an error for an attempt to schedule something in the past, and this is visible in the Logs for the rule. That prevents the rule from being fully initialized.

In the next release it will be protected against this error, so that the initialization completes, even though there won't be anything scheduled for such a trigger. If the variable is updated subsequently to a date in the future, that would cause it to become scheduled.

Two thoughts for when a rule doesn't work as expected: Logs are your friend. App Status page is your friend.

3 Likes