{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Data Workbench","type":"markdown"},"seo":{"title":"Scheduling a Query","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"scheduling-a-query","__idx":0},"children":["Scheduling a Query"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can run a query immediately, or schedule it for later. Treasure Data supports the following schedules for queries:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["None"]},". No schedule. Run the query immediately."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["@daily (midnight)"]},". Schedule a midnight daily query with a specific time zone. Optionally, choose to delay execution."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["@hourly (:00)"]},". Schedule an hourly query with a specific time zone. Optionally, choose to delay execution."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Custom cron"]},". Choose a cron schedule value with a specific time zone. Optionally, choose to delay execution."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-daily-or-hourly-query-schedule","__idx":1},"children":["Create a Daily or Hourly Query Schedule"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/queries/defining-a-query"},"children":["new query"]}," or select an existing query."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["None"]}," option next to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]}," to change it."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200903-225549.e62d84fd59c7b280f1aef95aea513ab69840053547a523a6be2579e6ec4d2478.89112c51.png","alt":""},"children":[]}," ","3. Select your query schedule. Both daily and hourly use the same steps to schedule a query."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200903-230434.3908bd06c209a55493a18f3e29a3b6c2fa1fd8aa94594670ec528f8c8acf6bca.89112c51.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Complete your query by scheduling the query and identifying the time zone."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200903-230815.35c99861e703c7e28580e68c3c1fc86a2d0f61a9332a3a4894382fc9dd26ce25.89112c51.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Optionally, delay the execution of your query."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200903-231111.0c257ba62782fb08c40c74d052add9e42db673ef2f056bc19da2e2db60b4fa45.89112c51.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":6},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-custom-query-schedule","__idx":2},"children":["Create a Custom Query Schedule"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Custom cron…"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200903-232912.4ae3566c02802cb8099ef74624333519cf09d95bed4f959797e5583b766eec28.89112c51.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select your Cron schedule"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, delay the execution of your query."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image-20200903-231111.0c257ba62782fb08c40c74d052add9e42db673ef2f056bc19da2e2db60b4fa45.89112c51.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},"."]}]}]},"headings":[{"value":"Scheduling a Query","id":"scheduling-a-query","depth":1},{"value":"Create a Daily or Hourly Query Schedule","id":"create-a-daily-or-hourly-query-schedule","depth":2},{"value":"Create a Custom Query Schedule","id":"create-a-custom-query-schedule","depth":2}],"frontmatter":{"seo":{"title":"Scheduling a Query"}},"lastModified":"2025-12-17T06:27:09.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/data-workbench/queries/scheduled/scheduling-a-query","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}