Google app script timeout ~ 5 minutes?

后端 未结 9 2194
粉色の甜心
粉色の甜心 2020-11-22 08:31

My google app script is iterating through the user\'s google drive files and copying and sometimes moving files to other folders. The script is always stopped after 5 minute

9条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 08:42

    Also, try to minimize the amount of calls to google services. For example, if you want to change a range of cells in the spreadsheets, don't read each one, mutate it and store it back. Instead read the whole range (using Range.getValues()) into memory, mutate it and store all of it at once (using Range.setValues()).

    This should save you a lot of execution time.

提交回复
热议问题