Reputation: 36672
I ran this apps-script code:
ScriptApp.newTrigger("foo")
.timeBased()
.everyMinutes(36)
.create();
But I see no change in the triggers UI:
Upvotes: 1
Views: 172
Reputation: 27390
As it is stated in the offical documentation, everyMinutes(n):
Specifies to run the trigger every n minutes. n must be 1, 5, 10, 15 or 30.
You chose 36
which is not supported.
For example, this works:
function foo() {
// code here to be executed every 30 minutes
}
function createTrigger(){
ScriptApp.newTrigger("foo").timeBased().everyMinutes(30).create();
}
Make sure you execute once the createTrigger
function in order to create the trigger for the foo
function:
Check also the error message. To my surprise, the error message is quite descriptive:
Exception: The value you passed to everyMinutes was invalid. It must be one of 1, 5, 10, 15 or 30.
Upvotes: 3