Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

290
Views
Google apps script wont run timed function when deployed as a web app

I've started experimenting with the timer installable trigger but I've run into an issue. I would like this function to run every minute on behalf of the user who opened a deployed web app link.

The project has the right authorization scope in the appsscript.json file but the timer execution always fails.

I tried reducing everything out of the program until it was the most basic it could be and it still always failed.

Here is the very simplified code:

function doGet() {
  ScriptApp.newTrigger('execute')
    .timeBased()
    .everyMinutes(1)
    .create();
}

function execute() {
  for (var i = 1; i <= 10; i++) {
    Logger.log(i);
  }
}

enter image description here

It seems like it has something to do with the timer trigger itself because the code I've tested inside of it seems irrelevant.

Any help would be much appreciated.

Edit:

I believe the issue was because it didn't want to allow the 3rd party account to run my code on behalf of them even though I had the auth scopes.

my solution was to send a spreadsheet 'copy' link instead of a web app and prompt them to run the code via image in the spreadsheet once they copied the sheet (which also copies the attached code). It then ran the timer trigger code fine, I suspect because it was happy it was running its own code and not someone else's.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!