This source code illustrates the following Medium article
Google Apps Script is an amazing language that can automate a lot of your work. However, working with GAS also means that you have to learn to live with its built-in limitations and quotas. One such quota is the total script runtime. It’s limited to six minutes on free accounts and thirty minutes on corporate accounts. After the above threshold is reached, the execution is interrupted with the following error message: