How to get next scheduled trigger time programmatically?

前端 未结 1 1177
盖世英雄少女心
盖世英雄少女心 2021-01-28 10:55

I make a new installable trigger that fires each 2 days for my spreadsheet programmatically. Then when I return to the spreadsheet, can I get the next time it will trigger a fun

相关标签:
1条回答
  • 2021-01-28 11:36

    There is no method for checking when a trigger will next run or even when it last ran. What you can do however is record when a trigger runs as part of your trigger function. Depending on your application, you can then store the value in a spreadsheet (or better yet use Properties service) and then compare this value to the current date/time to generate "Next trigger at..."

    This essentially accomplishes the same functionality without having to call a trigger method.

    0 讨论(0)
提交回复
热议问题