Execution of a smart contract function at a defined time

I am looking for a way to execute a smart contract function at a defined time without blocking the canister while waiting for that time. I believe this is a function that a smart contract should be able to have. I understand multiple threads, which would be a solution, are not implemented, but I wonder whether there is not a simpler way to implement a type of periodic or time based call to a canister function. Of course it would be possible to use another “computer” to call the canister when time is up, but a IC solution would be preferable and more elegant. Another solution could be an “time-interrupt-canister” which a canister could subscribe to. I did not find any information on such an issue on the forum. Does anybody have experience with a similar subject?


Thanks Alexander, this is a solution. I did not know the heartbeat function before and I understand now how it can work. However since I am not a rust programmer and I just started learning Motoko, I shall wait for a Motoko solution.

1 Like