存取及修改現有的重新整理時間表。如要取得所有重新整理時間表,請參閱 Spreadsheet.getDataSourceRefreshSchedules()。
請只將這個類別用於與資料庫連線的資料。
方法
| 方法 | 傳回類型 | 簡短說明 |
|---|---|---|
get | Data | 取得重新整理時間表的頻率,指定重新整理的頻率和時間。 |
get | Data | 取得這項重新整理排程的範圍。 |
get | Time | 取得下次執行這項重新整理時間表的時段。 |
is | 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