ERROR : Exceeded maximum execution time #155
Labels
bug
Related to a bug or a critical problem in the code.
feature request
Requests/ideas for features not already implemented in the code.
Steps to reproduce
Maybe I set too many reminders : anticipateDays: [0, 1, 7], and I have a lot of contacts with birthdays. But I don't know for sure what is causing this.
Expected behavior
The script should not run longer than the max time allowed by google app scripts !
Current behavior
On some days when an email reminder is sent to me, it is also followed by an email from [email protected] saying basically :
Context
The script doesn't use google +, and the config code will be below.
Extended description
The exact mail from google app scripts is :
Subject : Summary of failures for Google Apps Script: Contact birthdays custom mail notifications
Your script, Contact birthdays custom mail notifications, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
Sincerely, Google Apps Script Need help? Visit the Google Apps Script documentation. Please do not reply to this message. (c) 2019 Google
Today, the email I received before the notice of failure was a notice for one contact, which had five email addresses and three phone numbers.
I don't exactly know what the problem is since I do receive a notification email for the birthdays, before I get the notification that the script took too long to run. I will leave the code of my setup below.
Possible solution
I have read somewhere that the max run time for google app scripts is 6 minutes, and the only solution is having a script run partially while keeping track of time, then stop before 6 minutes saving the current state somewhere (ex in a spreadsheet), then start again reading the last state etc...
My config code
The text was updated successfully, but these errors were encountered: