Class DataSourceRefreshSchedule

DataSourceRefreshSchedule

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

MethodReturn typeBrief description
getFrequency()DataSourceRefreshScheduleFrequencyGets the refresh schedule frequency, which specifies how often and when to refresh.
getScope()DataSourceRefreshScopeGets the scope of this refresh schedule.
getTimeIntervalOfNextRun()TimeIntervalGets the time window of the next run of this refresh schedule.
isEnabled()BooleanDetermines whether this refresh schedule is enabled.

Detailed documentation

getFrequency()

Gets the refresh schedule frequency, which specifies how often and when to refresh.

Return

DataSourceRefreshScheduleFrequency — 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

getScope()

Gets the scope of this refresh schedule.

Return

DataSourceRefreshScope — 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

getTimeIntervalOfNextRun()

Gets the time window of the next run of this refresh schedule. Only applies if this refresh schedule is enabled.

Return

TimeInterval — 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

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 following scopes:

  • https://www.googleapis.com/auth/spreadsheets.currentonly
  • https://www.googleapis.com/auth/spreadsheets