Workflow only works with "Less than or equal to" condition

Why does the workflow only work with a “Less than or equal to condition”?

Whenever I try to just set it to Less than or equal to NOW - 2 Hours it works,

But i’m trying to make it work using Equals to NOW - 2 hours. It won’t work.

For some reason the only time conditions that work are Less than or equal to, or Greater than or equal to.

Equal to, or Greater than, or Less than, never work in my workflow scheduler.

Is there any reason for that?

Will this be ever addressed in SuiteCRM? It’s a very critical feature.

Workflow is fine.

The problem is your logic which is wrong.

To understand why it is like this you have to understand how workflows work. The crucial point is that the workflows script is invoked by a scheduler.
The scheduler is run at specific time intervals (which you define at two levels: the system crontab and SuiteCRM scheduled jobs).

Since the timing is an interval and not continuous it is almost impossible to meet the criteria when you use the equal condition.

If you use Less than or equal or Greater than or equal the condition will become true on the first time the workflow script is run when the condition is met. However, So this ensures that the workflow is triggered, however with a potential small error equal to the time difference between each time the workflow script is run by the scheduler and the actual time of your condition. So, if you set your scheduler to run every 5 minutes you will get a minimum error of 0 seconds and a maximum error of 5 minutes.

You may set your crontab to run every second, reducing thus the error to maximum one second. However this may cause some serious overload of your system.

On the other hand, given the way schedulers work, if you use equal to, it may (very likely) occur that, when the scheduler runs, the time yo have set is before or after the time in which the workflow is running (even by one millisecond) so that your condition is never met,

I hope you understand this.

Try to do a simulation in which you workflow script runs every 5 minutes and you set a time for your condition. Each time it runs update your values and you will see that, at a certain point the condition will become TRUE and the workflow will be triggered.