Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to automate Google Spreadsheets Scripts (e.g. without an event to trigger them)?

Does anyone know if it's possible to use Google Apps Scripts to run without needed a manual event? Meaning - I would like to set up a spreadsheet to send a form every day at a specified time. I have figured out how to manually send the form by executing a script, but has Google implemented to ability to set a script to run in the future (and on a recurring basis)?

I have searched for an answer but can't find one.

Thanks...

like image 228
AJW Avatar asked Jun 10 '10 22:06

AJW


People also ask

Can you automate Google Sheets?

Sheet Automation is a powerful, easy-to-use extension that takes Google Sheets to next level. Create your mini workflow with the intuitive UI and automate everything without writing script.

How do I trigger a script in Google Sheets?

Under Run, select the name of function you want to trigger. Under Events, select either Time-driven or the Google App that the script is bound to (for example, From spreadsheet). Select and configure the type of trigger you want to create (for example, an Hour timer that runs Every hour or an On open trigger).

What is trigger in Google script?

Triggers let Apps Script run a function automatically when a certain event, like opening a document, occurs. Simple triggers are a set of reserved functions built into Apps Script, like the function onOpen(e) , which executes when a user opens a Google Docs, Sheets, Slides, or Forms file.


1 Answers

Now it is possible to add time based events.

from: http://code.google.com/googleapps/appsscript/guide_events.html

  • Edit -> Current project's triggers. You see a panel with the message No triggers set up. Click here to add one now.
  • Click the link.
  • Under Run, select the function you want executed on schedule.
  • Under Events, select Time-driven.
  • On the first drop-down list that appears, select Week timer, Day timer, Hour timer, or Minutes timer. Depending on which you select, you see one or two additional lists. To test the trigger and your function, you might want to pick a short duration so that you can see the execution without having to wait hours or days.
  • If you picked Week timer, select a day of the week and time of day.
  • If you picked Day timer, select an hour.
  • If you picked Hour timer, select an interval of hours.
  • If you picked Minutes timer, select an interval of minutes.
  • Click Save.
  • To ensure that the script runs at the correct time for a particular time zone, click File > Properties, select a time zone, and click Save.
like image 136
Guy Avatar answered Oct 04 '22 11:10

Guy