The situation I have is this:
- a google form signup where people can sign up for notifications
- a series of scripts that I would like to run nightly that looks through the form responses and emails people appropriately, Emailer()
- an unsubscribe script that ideally runs frequently (every hour or so would be enough) as well as right before the notifications email is sent. This looks through the inbox for emails and removes the appropriate entries from the form responses, Unsubscriber()
I am having trouble coming up with a way to coordinate the way these two scripts will run. What I would like to happen is to have Unsubscriber() run every hour or so throughout the day. At midnight or some late night hour, I would like to run Emailer() once and have the Unsubscriber() function not be running at this time. Once Emailer() completes, I would like the Unsubscriber() function to resume running at its regular interval. I feel like this should be possible using a ClockTrigger, but I can't envision how to make it happen.
I am also wondering, if the Unsubscriber() function is scheduled to run every hour with a ClockTrigger, but takes longer than an hour on a certain instance, will the ClockTrigger start a second instance of the script?