I've read every available official docs (which is surprisingly not a lot) and all I could get for periodic tasks is this code
.setRecurring(true)
// start between 0 and 60 seconds from now
.setTrigger(Trigger.executionWindow(0, 60))
I know that .setRecurring
makes the job periodic and that the trigger
makes it start in a 60 seconds interval but what about the second time it's executed ? does this mean that the 2nd time would be also executed 60 seconds starting from the 1st one ?
This can't be true because even taking in consideration the optimisation in the background activities and how services run a little later than they're supposed to, programming 60 seconds period while the job runs about 5/10/20 minutes later is too much of a difference. The official docs say that the difference is seconds and maybe a few minutes not over 20 mins.
Basically, my question is does this .setTrigger(Trigger.executionWindow(0, 60))
really mean that the period is 60 seconds or am I gettin this wrong ?