Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activate a google apps script at a certain time every day? [duplicate]

I'm coding an application that will automatically open the launch meeting page for my next class, thus automatically joining me into the class ZOOM when it is time, but I'm not sure how I would go about doing the timings, I would need multiple triggers, at 9:00, at 10:20, at 11:40, at 1:00, and at 2:20, and not have them activate on saturdays or sundays. Any pointers?

like image 919
LlamaButt Avatar asked Mar 11 '26 07:03

LlamaButt


1 Answers

There are something that we call Triggers in Google Apps Script. Specifically, you will need a time based trigger.

Sample code using time based trigger:

function createTimeDrivenTriggers() {
    // Trigger every Monday at 09:00.   
    ScriptApp.newTrigger('myFunction')
        .timeBased()
        .onWeekDay(ScriptApp.WeekDay.MONDAY)
        .atHour(9)
        .create(); 
}

For more info, please see documentation

like image 199
NightEye Avatar answered Mar 12 '26 21:03

NightEye



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!