Skip to content

Scheduled flows

Update on the synQup core to have the Scheduled Flow Execution. The main thing that this feature differs from a Cronjob is that this will only run a flow once using the given Date Expression using Seconds, Minutes, Hours, Days, & Weeks.

We just need to add the dateExpression on flow.config and provide the expression based on time intervals using the first letter of the time intervals mentioned above (small caps - s, m, h, d, w).

A sample entry on the flow.config would be: {"dateExpression": "2h"}.

This was implemented using the Heartbeat System of the Core, and basing from the given expression, the Flow with the given configuration would be executed 2 hours from now.

The Feature doesn’t use Cron Expressions, and will just use the flow.config field itself in making a countdown until it reach the time where the Flow will already be dispatched/executed. So don’t be confused if you see the “2h” from the config turning into “-1h 240s”.

Update: The first state of this feature was just to countdown using only two time values having the seconds as the last value, for example: 1d 3600s or 1w 5600s which will let us have a hard time calculating the seconds if its really right. So I made an update on this task to always create the lower time intervals from the given date expression. For example: 3d will be transformed into 2d 23h 59m 60s, or 12h 30m will start from 11h 29m 60s.

This way, we will have an easier grasp of the time that the flow will be executed.