Triggers executing at irregular times

We have 2 triggers setup for happy hour on Wed & Fri (plus 2 more triggers to stop happy hour), and they are activating at irregular times. Sometimes it’s an hour earlier, other times it’s a day earlier.
Logging out and back in doesn’t fix it. We have to run the stop happy hour actions manually.
All of the computers have the correct time. And the triggers show the correct timeframes when we test them.

Trigger code is untouched for years so I’m not sure if it is a bug or a configuration issue. Can you tell me more about your trigger setup?

I will use tonight as an example.
The trigger is set for 18:28
A rule executes for this trigger and changes the Price Definition to Happy Hour Friday. It also sends an email to notify us that happy hour has started.
This worked properly.

Then another trigger is set for 19:32 to stop happy hour.
A rule executes and changes the Price Definition to blank (null) to turn off happy hour.
It also sends and email.
But this time it sent an email to say that Happy Hour Friday was started, then 3 more emails to say that happy hour had stopped.
But Happy Hour Friday was still active. We had to stop it manually.

Triggers executes on all terminals so all actions will execute once on each terminal. Having a start e-mail again after 19:32 might mean a terminal incorrectly enables happy hour. While changing configurations all terminal settings will not update until caches refreshed.

It operates for years on some of our first venues without issues. One of them have 7 triggers because it offers discounts for 7 different products every day and + 1 more for disabling happy hour so I don’t think there is a bug with trigger timing. I know you tried log-off, log-in or maybe tried more but it still seems like a configuration issue.

If a trigger passes due time while SambaPOS is closed it will trigger immediately when you start SambaPOS. I don’t know if it relates with your issue but sometimes that confuses people while testing.

So does that mean if I only have the rules execute on one terminal only (set via rule mapping), only that terminal will have happy hour ?

No. Since you change department’s price list setting, other terminals will start using these prices as soon as caches refreshed (eg. login, logout). Executing triggers on all terminals eliminates the need for cache refresh on all terminals.

Happy Hour Trigger - not executing

The HH trigger out of the blue stopped triggering as previously performing, and the refresh of cache does not execute back (login user in and out does not reset). Please advise

Change deparment’s price tag setting manually to switch to regular prices. However the reason that not quite understandable from your description. Maybe you should Check your terminal times as one of them may incorrectly execute trigger.

We also have trigerless HH implementation tutorial here. You might want to check that.

1 Like