export type EveryMinutesType = 1 | 5 | 10 | 15 | 30 ; export class TimeTrigger { see https public addNewEveryHoursTrigger ( functionName , hours ) { ScriptApp . newTrigger ( functionName ) . timeBased ( ) . everyHours ( hours ) . create ( ) ; } /**
     * EveryMinutes's value must be one of 1, 5, 10, 15 or 30.
     */ public canAcceptableAsEveryMinutes ( minutes ) { return [ 1 , 5 , 10 , 15 , 30 ] . indexOf ( minutes ) !== - 1 ; } see https public addNewEveryMinutesTrigger ( functionName , minutes ) { ScriptApp . newTrigger ( functionName ) . timeBased ( ) . everyMinutes ( minutes ) . create ( ) ; } public deleteTrigger ( functionName ) { const triggers = ScriptApp . getProjectTriggers ( ) ; triggers . forEach ( trigger => { if ( trigger . getHandlerFunction ( ) === functionName ) { ScriptApp . deleteTrigger ( trigger ) ; } } ) ; } }