class LockService method .releaseLock()

LockService is the Apps Script service.

.releaseLock() is the method name you will see after a dot in your code.

What it does

Releases a lock so other script runs can continue.

Why it's used

  • Let the next run proceed after yours completes.
  • Always pair with waitLock or tryLock in a finally block.

Common errors

  • Forgetting parentheses on releaseLock. Write LockService.releaseLock(), not LockService.releaseLock or releaseLock by itself.
  • Skipping dots between chained calls. Each step needs a dot, like LockService.releaseLock().
  • Adding spaces where they do not belong. Write LockService.releaseLock(), not LockService .releaseLock(), LockService.releaseLock (), or LockService . releaseLock().
  • Wrong capitalization. Use LockService and releaseLock, not lockservice or releaselock.

Explore

Related methods

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.