Single Execution Task
Last updated
Last updated
Sometimes, you might want to have Gelato call your function only once. If so, you can make use of the SingleExec
module which automatically cancels the task for you after one execution.
The task will still be canceled if the execution reverts on-chain
Here is how you can enable SingleExec
when creating your task across the various task creation methods.
Open up the Advanced Settings panel when creating a new task and select Single execution task:
Set singleExec
flag to true
when calling createTask
.
Include SingleExec
module in ModuleData.modules
. Check out the full code here.