Class DataSourceRefreshScheduleFrequency

DataSourceRefreshScheduleFrequency

Access a refresh schedule's frequency, which specifies how often and when to refresh.

Only use this class with data that's connected to a database.

To see the next time this refresh schedule is scheduled to run, use DataSourceRefreshSchedule.getTimeIntervalOfNextRun().

To update, use DataSourceRefreshSchedule.setFrequency(newFrequency).

Methods

MethodReturn typeBrief description
getDaysOfTheMonth()Integer[]Gets the days of the month as numbers (1-28) on which to refresh the data source.
getDaysOfTheWeek()Weekday[]Gets the days of the week on which to refresh the data source.
getFrequencyType()FrequencyTypeGets the frequency type.
getStartHour()IntegerGets the start hour (as a number 0-23) of the time interval during which the refresh schedule runs.

Detailed documentation

getDaysOfTheMonth()

Gets the days of the month as numbers (1-28) on which to refresh the data source. Only applies if frequency type is monthly.

Return

Integer[] — The days of the month on which to refresh.

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

getDaysOfTheWeek()

Gets the days of the week on which to refresh the data source. Only applies if the frequency type is weekly.

Return

Weekday[] — The days of the week on which to refresh.

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

getFrequencyType()

Gets the frequency type.

Return

FrequencyType — The frequency type.

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

getStartHour()

Gets the start hour (as a number 0-23) of the time interval during which the refresh schedule runs. For example, if the start hour is 13 and the time interval's duration is 4 hours, then the data source is refreshed between 1 p.m. and 5 p.m. The hour is in the timezone of the spreadsheet.

Return

Integer — The start hour.

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