![]() Use this option to run a function in your script daily at a specific time interval. Use this option to run a function in your script every hour or once every N hours (N can be 2, 4, 6, 8 or 12). Use this option to run a function in your script every minute or once every N minutes (N can be 5, 10, 15 or 30). Also, the hours and minutes must be specified using the 24-hour clock. You must specify the date and time in the YYYY-MM-DD HH:MM format and in the GMT-07:00 timezone (which is the Pacific Daylight Time or PDT). Use this option to run a function in your script at a specific date and time in the future. There are six types of Time-based triggers Specific date and time If you have an engineering background, a Time-driven trigger is similar to a CRON job. Sending yourself an email every month to remind yourself of your goals or resolutions. Here are some examples of use cases where you might use a Time-based trigger:Īutomatically sending a report to your team every morning. Use Time-driven triggers to run a function in your script periodically OR at a specific date and time in the future. They are: Time-driven triggers and Spreadsheet triggers. There are two types of triggers in Google Sheets. You enter all the birthdays you want to remember into a spreadsheet and then use a trigger to check it every morning at 6AM and send you an email if it is someone's birthday.įrom a technical standpoint what is happening is that the trigger causes a Google Apps Script function to run every morning and this function reads the birthdays from the spreadsheet and sends you an email if that day happens to be someone's birthday. You make a new year resolution to remember birthdays and you decide to use your spreadsheet skills to help you keep your resolution. Suppose you're like me and you tend to forget the birthdays of your friends and relatives. The best way to understand how triggers work is to look at an example. In this article, you'll learn more about triggers, how they work and how to create them. Triggers are a feature in Google Apps Script and they enable you to automate your tasks and workflows in Google Sheets.įor example, if you want a metrics report emailed to your boss every morning, you can use a Time-driven trigger along with some Apps Script code to automate sending this report.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |