Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Apps Script Project Trigger Is Not Visible Across Shared Users

I have a working apps script project that connects google sheets & big query to create materialized views within the big query. I am scheduling a couple of functions to run on a periodic basis. Everything is working fine under my account except when I share the sheets & scripts to another account, they cannot see the project triggers which is scheduled using my account.

How to enable the visibility of project triggers across all users? Otherwise, we have the high probability to end up scheduling same functions or if the other person needs to change the scheduling time. Please let me know if I am doing anything wrong.

Triggers enabled via app script: enter image description here

The sheets & scripts are shared via https://script.google.com

enter image description here

Triggers not visible for another user: enter image description here

like image 265
Logan Avatar asked Apr 27 '26 12:04

Logan


1 Answers

Implementing programmatic triggers makes much more sense than manual triggers to share scripts across users:

https://developers.google.com/apps-script/guides/triggers/installable#managing_triggers_programmatically

/**
 * Creates a two time-driven triggers.
 */
function createTimeDrivenTriggers() {
  // Trigger every 6 hours.
  ScriptApp.newTrigger('myFunction')
      .timeBased()
      .everyHours(6)
      .create();

  // Trigger every Monday at 09:00.
  ScriptApp.newTrigger('myFunction')
      .timeBased()
      .onWeekDay(ScriptApp.WeekDay.MONDAY)
      .atHour(9)
      .create();
}
like image 182
Logan Avatar answered May 03 '26 18:05

Logan



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!