How to create a ticker or timer to refresh() every so often

Yes.

schedule("0 "+randomMinute+" "+randomHour+" ? * FRI *", checkForUpdate)

this runs at a random time, this is a direct quote from one that works. But if you wanted to schedule the job to run every 4 mins,

schedule("0 */4 * ? * * *", refresh)

I am pretty sure that would be what you would want.

Or you can simply do runEvery5Minutes(refresh) or runEvery10Minutes(refresh) also. There are several different options up to 3 hours I think. But you can't use any number you want.

1 Like