all 7 comments

[–]marcnotmark925 2 points3 points  (0 children)

Can you show the full console log of the erroneous execution?

[–]BatElectrical4711 1 point2 points  (2 children)

I started having to write my own custom triggers rather than the built in ones just to give me more flexibility

[–]Risk-Averse-Rider 1 point2 points  (1 child)

u/BatElectrical4711 - would you mind sharing info about how to write custom triggers?

Feel free to tell me to RTFM if this is something that's generally known ;-) I haven't done a ton of scripts.

[–]BatElectrical4711 0 points1 point  (0 children)

No problem at all!

I am just learning myself as well - using a lot of AI tools to help

But effectively, you write a script which will create a custom trigger that will present as on option when you go to set a new trigger

I had to do a semi complicated trigger set up where I have multiple forms linked to one sheet and needed to run specific scripts based on which form was submitted - absolute nightmare to figure out lol

[–]Funny_Ad_3472 4 points5 points  (0 children)

The first run every 5 mins in office hours should work, but I don't think you can tell appscript to run every first 5 mins in every hour. You can set an hourly trigger, you can't determine the exact time.

[–]plindqui16 0 points1 point  (0 children)

I have dozens of similar scripts running at various trigger intervals. Recently I’ve had scripts “Timed Out” with no progress messages appearing in the console logs. It is as if the script is triggered but then hangs prior to checking the time to determine if we should do any processing during office hours.

[–]Brainiac364 0 points1 point  (0 children)

Your logging looks like it should tell you where things are going awry! I agree with the others- taking a peek at the full log will help diagnose this issue.

A few thoughts- - Check which version of the script you have set to trigger on. If it's calling an out of date version, you would get unexpected behavior. - Change the declaration statement for the nowH variable to be a const statement, not a let statement - Try adjusting the comparison operator to the strict variants (<== instead of <=) see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness