How to only have a script triggered once at a time

19 views
Skip to first unread message

Matthew Thomas

unread,
Aug 9, 2020, 6:17:51 PM8/9/20
to Google Apps Script Community
Hi,

I have a complex script that works fine if its running by itself, but as soon as another instance of the same script is running or a different script is running at the same time, then it can break.

I currently have the trigger for this script as onChange because it needs to be completely live. Is there anyway to only allow 1 instance of 1 script to be running at a time?

Thanks for your help
Matthew Thomas

Alan Wells

unread,
Aug 9, 2020, 6:21:22 PM8/9/20
to Google Apps Script Community
You can try using:
LockService
Reply all
Reply to author
Forward
0 new messages