Post
Share your knowledge.
How to automate SUI smart contracts like a cron job?
Hi folks! I'm trying to figure out if a SUI smart contract can execute its functions automatically, much like a cron job. Are there any blockchain mechanisms for this, and what are best practices to achieve it?
- Sui
Answers
3No, SUI smart contracts do not execute functions automatically unless triggered by a transaction. This means there are no native time events in place for autonomous execution.
Blockchain platforms typically do not support the cron job-like functionality natively. You might need to use an external solution to trigger the smart contract function at specific intervals.
You can't run Sui smart contracts automatically like a cron job because the network doesn't support native time-based triggers. Smart contracts on Sui only execute when someone sends a transaction to call them, so they won’t run on their own at scheduled intervals. To get around this, you can use off-chain automation tools or bots that monitor time or events and then send transactions to the contract when needed. This setup is similar to how Chainlink Automation works on other chains, where external services check conditions and trigger functions. If you're building something that needs regular execution—like a payout or a reset—you’ll need to set up a backend service or use a decentralized automation protocol that supports Sui.
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410