You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current version requires users to create their time-driven triggers manually from their Apps Script dashboard.
In fact, the time-driven triggers can be also created and deleted triggers programmatically with the Script service. Start by calling ScriptApp.newTrigger(functionName), which returns a TriggerBuilder.
The following example shows how to create two time-driven triggers—one that fires every 6 hours, and one that fires every Monday at 9 a.m. (in the time zone that your script is set to).
/** * Creates two time-driven triggers. */functioncreateTimeDrivenTriggers(){// 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();}
The current version requires users to create their time-driven triggers manually from their Apps Script dashboard.
In fact, the time-driven triggers can be also created and deleted triggers programmatically with the
Script service
. Start by callingScriptApp.newTrigger(functionName)
, which returns aTriggerBuilder
.The following example shows how to create two time-driven triggers—one that fires every 6 hours, and one that fires every Monday at 9 a.m. (in the time zone that your script is set to).
Reference: Managing triggers programmatically | Google Developers
New users can set up our script more easily, if a new function for trigger creation is added.
The text was updated successfully, but these errors were encountered: