我在線查看了Google應用程序腳本可安裝觸發器文檔(https://developers.google.com/apps-script/support),其中一個示例顯示瞭如何創建2個時間觸發器。2時間觸發器 - Google應用程序腳本
function createTimeDrivenTriggers() {
// Trigger every 6 hours.
ScriptApp.newTrigger('myFunction')
.timeBased()
.everyHours(6)
.create();
// Trigger every Monday at 09:00.
ScriptApp.newTrigger('myFunction')
.timeBased()
.onWeekDay(ScriptApp.WeekDay.MONDAY)
.atHour(9)
.create();
}
我的代碼:
function createTimeDrivenTriggers() {
// Trigger every 1 hours.
ScriptApp.newTrigger('MainFunctionDaily')
.timeBased()
.everyHours(1)
.create();
// Trigger every Friday at 13:00.
ScriptApp.newTrigger('MainFunctionWeekly')
.timeBased()
.onWeekDay(ScriptApp.WeekDay.FRIDAY)
.atHour(13)
.create();
}
然而,當我試圖創建觸發器,我得到一個錯誤:
這個附加組件已經創造了這太多的基於時間的觸發器此Google用戶帳戶的文檔
請指教