AI-generated Key Takeaways
-
Use DataSourceRefreshSchedule to access and modify existing refresh schedules.
-
This class should only be used with data that is connected to a database.
-
Methods are available to get the refresh schedule frequency, scope, time interval of the next run, and whether the schedule is enabled.
-
All methods require specific authorization scopes to be used.
Access and modify an existing refresh schedule. To get all refresh schedules, see Spreadsheet.getDataSourceRefreshSchedules()
.
Only use this class with data that's connected to a database.
Methods
| Method | Return type | Brief description |
|---|---|---|
Data
|
Gets the refresh schedule frequency, which specifies how often and when to refresh. | |
Data
|
Gets the scope of this refresh schedule. | |
Time
|
Gets the time window of the next run of this refresh schedule. | |
Boolean
|
Determines whether this refresh schedule is enabled. |
Detailed documentation
get
Frequency()
Gets the refresh schedule frequency, which specifies how often and when to refresh.
Return
Data
— The refresh schedule frequency.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get
Scope()
Gets the scope of this refresh schedule.
Return
Data
— The refresh scope.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
get
Time
Interval
Of
Next
Run()
Gets the time window of the next run of this refresh schedule. Only applies if this refresh schedule is enabled.
Return
Time
— The time window of the next run.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets
is
Enabled()
Determines whether this refresh schedule is enabled.
Return
Boolean
— Whether this refresh schedule is enabled.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/spreadsheets.currentonly -
https://www.googleapis.com/auth/spreadsheets

