Class DataSourceRefreshSchedule

DataSourceRefreshSchedule

访问和修改现有刷新时间表。如需获取所有刷新时间表,请参阅 Spreadsheet.getDataSourceRefreshSchedules()

仅将此类用于与数据库关联的数据。

方法

方法返回值类型简介
getFrequency()DataSourceRefreshScheduleFrequency获取刷新时间表频率,该频率指定了刷新频率和时间。
getScope()DataSourceRefreshScope获取此刷新时间表的范围。
getTimeIntervalOfNextRun()TimeInterval获取此刷新时间表下次运行的时间窗口。
isEnabled()Boolean确定是否已启用此刷新时间表。

详细文档

getFrequency()

获取刷新时间表频率,该频率指定了刷新频率和时间。

返回

DataSourceRefreshScheduleFrequency - 刷新时间表频率。

授权

使用此方法的脚本需要获得以下一个或多个范围的授权:

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

getScope()

获取此刷新时间表的范围。

返回

DataSourceRefreshScope - 刷新范围。

授权

使用此方法的脚本需要获得以下一个或多个范围的授权:

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

getTimeIntervalOfNextRun()

获取此刷新时间表下次运行的时间窗口。仅当此刷新时间表处于启用状态时适用。

返回

TimeInterval - 下次运行的时间窗口。

授权

使用此方法的脚本需要获得以下一个或多个范围的授权:

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

isEnabled()

确定是否已启用此刷新时间表。

返回

Boolean - 是否已启用此刷新时间表。

授权

使用此方法的脚本需要获得以下一个或多个范围的授权:

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