I have a need to process a queue at regular intervals. So, my canister that initiates the processing of the queue needs to run on a timer. I have seen some discussions about cron jobs in this forum. My understanding is that there is now a solution in Rust (IC Cron), but there is no solution for Motoko at this time. Is that the current status, and if so, are there any near-term plans to provide cron jobs for Motoko?
(I apologize if the answer is obvious and I just don’t understand Rust/Motoko interop.)
Thank you.
2 Likes
This answers one of my questions. At the moment, it is not possible to import Rust modules in Motoko. I’m glad to see that it is a goal though.
# Motoko Evolution White Paper (Draft)
(Note: The status of this document still is very rough. It has more the character of a brain dump. Provided as is.)
## Background
### Introduction
*Motoko* is a general-purpose programming language designed to provide a seamless and modern programming experience on the Internet Computer (IC). To that end, it has built-in support for various features specific to the IC, such as:
* Representation of canisters as *actors* with asynchronous and atomic methods.
* Automatic integration with *Candid* for implicitly de/serialising message arguments and automatic derivation of Candid interfaces.
* *Async/await* support for straight-line coding of asynchronous messaging patterns.
* *Orthogonal peristence* keeping program state alive across messages automatically.
* *Stable variables* for persisting selected program state even across program version upgrades.
* Built-in support for other IC mechanisms, such as cycles, upgrades, heartbeat, etc (some of it still incomplete).
Motoko was initially designed and implemented as a relatively minimal language. This was both to keep it simple and to get off the ground more quickly. Consequently, there is a range of features it still lacks. Some are mere implementation gaps relative to the "complete" semantics provided by the interpreter, some are additional features that were anticipated from the beginning but consciously deferred, some have been discovered as new requirements over time.
This file has been truncated. show original