[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eDataSourceRefreshSchedule\u003c/code\u003e allows you to access and modify the refresh schedule of data connected to a database in Google Sheets.\u003c/p\u003e\n"],["\u003cp\u003eYou can get details like refresh frequency, scope, next run time window, and whether the schedule is enabled.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods like \u003ccode\u003egetFrequency()\u003c/code\u003e, \u003ccode\u003egetScope()\u003c/code\u003e, \u003ccode\u003egetTimeIntervalOfNextRun()\u003c/code\u003e, and \u003ccode\u003eisEnabled()\u003c/code\u003e to manage the refresh schedule.\u003c/p\u003e\n"],["\u003cp\u003eUsing these methods requires authorization with specific scopes, such as \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["DataSourceRefreshSchedule\n\nAccess and modify an existing refresh schedule. To get all refresh schedules, see [Spreadsheet.getDataSourceRefreshSchedules()](/apps-script/reference/spreadsheet/spreadsheet#getDataSourceRefreshSchedules()).\n\n\n**Only use this class with data that's connected to a database.** \n\nMethods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| [getFrequency()](#getFrequency()) | [DataSourceRefreshScheduleFrequency](/apps-script/reference/spreadsheet/data-source-refresh-schedule-frequency) | Gets the refresh schedule frequency, which specifies how often and when to refresh. |\n| [getScope()](#getScope()) | [DataSourceRefreshScope](/apps-script/reference/spreadsheet/data-source-refresh-scope) | Gets the scope of this refresh schedule. |\n| [getTimeIntervalOfNextRun()](#getTimeIntervalOfNextRun()) | `Time``Interval` | Gets the time window of the next run of this refresh schedule. |\n| [isEnabled()](#isEnabled()) | `Boolean` | Determines whether this refresh schedule is enabled. |\n\nDetailed documentation \n\n`get``Frequency()` \nGets the refresh schedule frequency, which specifies how often and when to refresh.\n\nReturn\n\n\n[DataSourceRefreshScheduleFrequency](/apps-script/reference/spreadsheet/data-source-refresh-schedule-frequency) --- The refresh schedule frequency.\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n`get``Scope()` \nGets the scope of this refresh schedule.\n\nReturn\n\n\n[DataSourceRefreshScope](/apps-script/reference/spreadsheet/data-source-refresh-scope) --- The refresh scope.\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n`get``Time``Interval``Of``Next``Run()` \nGets the time window of the next run of this refresh schedule. Only applies if this refresh\nschedule is enabled.\n\nReturn\n\n\n`Time``Interval` --- The time window of the next run.\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n`is``Enabled()` \nDetermines whether this refresh schedule is enabled.\n\nReturn\n\n\n`Boolean` --- Whether this refresh schedule is enabled.\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`"]]