What are the possibilities to repeat a sendTelegram if it fails


imagine I put a sendTelegram into my rules file and it fails because there is no internet connection. What are my possibilities to retry sendTelegram for e.g. 10 minutes every minute and only then give up?
(I have lots of sendTelegram statements with various messages in separate rules)

As I understood, rules run single threaded? So if I would block inside a rule the whole rules engine will stuck. Is there a neat way using the “standard” rules engine?

I was also thinking maybe to spawn a separate linux process which sends the messages, so there would be for each new sendTelegram a new process until it succeeds or gives up trying.


Have you tested what happens if there is no internet connection? What happens.

In you rules you could check if you have an internet dropout and then write the message to a text file. Then when internet is reconnected send those messages line by line to telegram.

Why would you do that? The rules systems allow you to create timers and schedule a task for a time in the future, like trying again.

I’ll try the looping timers pattern. Thank you very much for pointing me to it!