Checkpoint a long run so the next trigger finishes the job
You already batch setValues, respect quotas, and chunk CSV imports. Then a 45-minute export still dies at ~6 minutes with half the work done…
Checkpoint a long run so the next trigger finishes the job
You already batch setValues, respect quotas, and chunk CSV imports. Then a 45-minute export still dies at ~6 minutes with half the work done…
Read / Write a Job Checkpoint
Long jobs hit the ~6-minute wall mid-batch. A checkpoint in Script Properties — { key, cursor, updatedAt } — lets the next timed trigger…
Try Lock Or Skip
Time-driven triggers and overlapping edits collide. withScriptLock waits then throws if it can't acquire — great when failure must be loud…
withScriptLock Helper
Standalone projects and library code don't get a Document Lock. When the critical section is the script project itself — watermark updates…
withUserLock Helper
Document locks serialize everyone on a spreadsheet. User locks only serialize the same user's overlapping runs — handy for personal quotas…
withDocumentLock Helper
When a time-driven trigger and a manual run can overlap — or two editors kick the same sync — you need a lock. This helper wraps LockService…