Class DataSourceRefreshScheduleFrequency
內容詳盡的說明文件
getDaysOfTheMonth()
取得當月要重新整理資料來源的日期 (以 1 到 28 的數字表示)。僅適用於頻率類型為每月。
回攻員
Integer[]
:每月要重新整理的日期。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getDaysOfTheWeek()
取得要用來重新整理資料來源的星期幾。僅適用於頻率類型為每週的情況。
回攻員
Weekday[]
:要更新的星期幾。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getFrequencyType()
取得頻率類型。
回攻員
FrequencyType
:頻率類型。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getStartHour()
取得重新整理時間表執行期間的時間間隔起始小時 (以 0 到 23 的數字表示)。舉例來說,如果開始時間為 13,時間間隔的長度為 4 小時,則資料來源會在下午 1 點到 5 點之間更新。時間以試算表的時區為準。
回攻員
Integer
:開始小時。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-02 (世界標準時間)。
[null,null,["上次更新時間:2024-12-02 (世界標準時間)。"],[[["`DataSourceRefreshScheduleFrequency` allows you to access and manage the frequency of data source refreshes for spreadsheet data connected to a database."],["You can retrieve information about the refresh schedule, including the days of the month or week, the frequency type, and the start hour of the refresh."],["Use `DataSourceRefreshSchedule.getTimeIntervalOfNextRun()` to determine the next scheduled refresh time."],["Update the refresh frequency using `DataSourceRefreshSchedule.setFrequency(newFrequency)`."],["Scripts using these methods require authorization with specific scopes related to spreadsheet access."]]],["This content describes the `DataSourceRefreshScheduleFrequency` class for managing data refresh schedules connected to databases. Key actions include accessing the refresh frequency, determining the next run time via `getTimeIntervalOfNextRun()`, and updating the schedule with `setFrequency()`. Information can be retrieved for monthly refreshes, with `getDaysOfTheMonth()`, or for weekly refreshes, with `getDaysOfTheWeek()`. `getFrequencyType()` retrieves the type, and `getStartHour()` the start time. The relevant authorization scopes are also specified.\n"]]