Does [overwrite: false] actually do anything to runIn()?

It’s not documented whether this parameter does anything here:

In one of my apps which I hodgepodged together from another app I use runIn(delay, lockTheLocks, [overwrite: false]). I can guess that in this example the runIn() timer would continue counting even if you ran runIn() again but this is speculation since it’s not documented.

Anyone know exactly if and what that parameter would do?

There might be something in the new documetnation to help you out:

And here is an example app that uses the overwrite:false command:

Thanks Ben,

Besides the example is the method documented? Otherwise we’re back to square one. I tried flipping through some of the items on the link you guide you sent and couldn’t find runIn().

This is a good question that it looks like we don’t really cover in the docs.

Using [overwrite: false] does change how the underlying scheduling works. When you call runIn(300, 'doSomething'), we schedule it for 5 minutes out. Normally, if in that 5 minute window you call the same runIn(300, 'doSomething') method again we will stop the original schedule and just use the new one. In this case there is at most one schedule for the ‘doSomething’ method.

However, if you were to call runIn(300, 'doSomething', [overwrite: false]), then we let the original schedule continue and also add a new one for another 5 minutes out. This could lead to many different schedules. If you are going to use this, be sure to handle multiple calls to the ‘doSomething’ method.


Thanks Matt. Makes sense.