Disabling manual flow inject

I have a flow which calculates financial compounded interest from savings.
The flow runs every midnight, and each subsequent node in the flow then does a calculation from saved context values, and outputs the amount of interest accrued in the previous 24hrs.
The output then is stored in influx and plotted in a grafana chart.
Grafana can then aggregate the values for the relevant tax year, and present the data in chart form.
All good & working OK, except if the inject node that starts the flow is accidently pressed, then the daily interest calculation would be run twice in that 24hrs, and therefore create a false daily amount. I would then have to manually go into influx and delete the data from that inject.

I know that I should take more care :roll_eyes: but with inquisitive grandkids, dodgy mousepad, bad eyesight, etc...

Anyone know how to run a flow only once at each midnight, without exposing the manual inject button?
Cron+ has the same manual button, and I've also looked at adding a delay node set to rate-limit 1 message per 1439 minutes (but it of course forgets the message count if my server is rebooted).

Lock the flow and inject nodes will not be clickable. I have all flows locked per default, which prevents me to move nodes by accident and so on.

1 Like

How about delay node set to rate limit 1 message per 24hr.
Or a switch node to check the the time is between a certain time using JSONata and $moment().

1 Like

If you add 2 schedules to cron-plus the inject button is removed. You can set the 2nd schedule to a point in the past so it never triggers.

@pticon91 David, thanks, I'll give this a try as it would also prevent any deletions and keeps the nodes from being moved.

I've tried that;

But if David's solution doesn't work out, this also sounds a good solution. Thanks.

1 Like

Did this not satisfy your original requirement?

If not then an alternative is to remove all Cron schedules and manually inject a dynamic schedule from an on start inject node.

Both solutions do what you ask.

1 Like

Sorry, I didn't see your post before I posted.

I knew about adding 2 schedules removing the inject button, but didn't think about setting the 2nd schedule to a point in the past :roll_eyes:

Thanks Steve.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.