How to set a custom frequency trigger on google apps script

前端 未结 2 1397
情歌与酒
情歌与酒 2020-12-22 01:22

I\'m a new user for Google apps script, I meet a question recently. In Google apps script, I want to set a trigger to run the app on 9:00AM every day. But I can only set a t

2条回答
  •  滥情空心
    2020-12-22 01:58

    if it must run precisely at a given time, your only option is to create a trigger that runs every minute, and first thing checks if its the correct time to run.

    to check if its time, save the last run time in a script property and compare with the current time.

    all other methods will give you a delay of a few minutes, even if you set the trigger to run at a specific time.

提交回复
热议问题