I'm looking to create a function that executes instructions in a time frame. For example I want to call a function that will change my variable in 50 seconds.

I have searched but I saw that I need to import something else. Is there any way to do this directly in solidity?

1 Answer 1


No. A smart contract can't "wait" (make time pass), nor execute itself after some time, nor execute another smart contract at another time. You need some script or bot or cron job outside of the blockchain to achieve this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.