Class DataSourceRefreshSchedule Stay organized with collections Save and categorize content based on your preferences.
Page Summary
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, seeSpreadsheet.getDataSourceRefreshSchedules().
Only use this class with data that's connected to a database.
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Data | Gets the refresh schedule frequency, which specifies how often and when to refresh. |
get | Data | Gets the scope of this refresh schedule. |
get | Time | Gets the time window of the next run of this refresh schedule. |
is | Boolean | Determines whether this refresh schedule is enabled. |
Detailed documentation
getFrequency()
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 followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
getScope()
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 followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
getTimeIntervalOfNextRun()
Gets the time window of the next run of this refresh schedule. Only applies if this refreshschedule 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 followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
isEnabled()
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 followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.