#When to use io.wait() vs deliverAfter in sendEvent

1 messages · Page 1 of 1 (latest)

pine quest
#

Hi everyone, I'm currently working on creating a job to check if a domain has propagated. Before triggering the job initially, I need to wait for a brief period of 2 hours.
I've come across two methods to accomplish this: io.wait() and deliverAfter.
I'm seeking advice on the preferred approach and the reasons behind it.
Your insights are much appreciated!

fathom epoch
#

If you put io.wait() at the very start of your run then there’s not a lot of difference for your use case.

You can cancel an event sent with sendEvent before the run starts. That might be useful if you have a cancel button in your UI.