--- title: "How do I schedule a query from LumiCode?" slug: "how-do-i-schedule-a-query-from-lumicode" tags: ["LumiCode", "schedule"] updated: 2026-10-23T12:22:49Z published: 2026-10-23T12:22:49Z canonical: "support.lusid.com/how-do-i-schedule-a-query-from-lumicode" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # How do I schedule a query from LumiCode? Once a query gives you the answer you want, you can have it run by itself every morning, every hour or on any timetable you like, without leaving LumiCode. LumiCode creates the schedule in the LUSID Scheduler, so it runs whether or not LumiCode is open. ## Prerequisites - LumiCode installed and signed in. See [How do I install LumiCode?](/v1/docs/how-do-i-install-lumicode) - The **Luminesce Query Runner** job (`default/QueryRunner`) set up in your domain. If it isn't, LumiCode tells you, and your domain's administrator needs to install it. - Permission to create schedules in the LUSID Scheduler. - The query you want to schedule, run at least once in LumiCode. ## Method ### Step 1: Pick the query 1. Type `/recent` and press Enter. 2. Select the query and press Enter. 3. Choose **run it on a schedule**. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-5RUK1OJG.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A44Z&se=2026-11-18T20%3A26%3A44Z&sr=b&sp=r&sig=%2BvcBZUjugLqCcpWj7NjFOmUAbaANbdS5wveUAboS1WM%3D) If schedules already run the Luminesce Query Runner job, LumiCode lists them first. Choose **a new schedule**, or select an existing one to change it so it runs this query instead. ### Step 2: Name the schedule LumiCode asks for each of the following in turn, with a suggested answer you can accept with Enter: 1. **Scope** and **code**, which together identify the schedule. The scope defaults to `lumi`. 2. **Name** and **description**, shown in the Scheduler. 3. **The user to run as.** The schedule runs with this user's permissions. It defaults to you, and the Scheduler also accepts a service user. Press Esc at any point to go back one question. ### Step 3: Check the arguments LumiCode lists the job's arguments, each set to the job's default, with your query as `QUERY_01`. Select an argument to change its value. When they're right, choose **these arguments are right**. You can't edit the query itself here. To change it, edit and run it at the prompt, then schedule it again from `/recent`. ### Step 4: Choose when it runs Choose one of the following: - **daily, at a time**: enter a time of day, such as `07:30`, then choose the days of the week. - **hourly, at a minute past the hour**: enter the minute, then choose the days of the week. - **a cron expression**: for anything else. The Scheduler uses Quartz cron expressions, which start with seconds, for example `0 0 7 ? * *` for 07:00 every day. Then choose the time zone. UTC is first in the list. ### Step 5: Confirm LumiCode shows a summary of the schedule. Check it and confirm. LumiCode then shows the new schedule's identifier and when it runs. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-MLQVVAN2.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A26%3A44Z&se=2026-11-18T20%3A26%3A44Z&sr=b&sp=r&sig=r4Sz5E5jWPTOX9xG%2F3TkwCGyZbeUA8bE3awraNkLR6s%3D) ## Monitoring a schedule Type `/schedules` to list the schedules that run the Luminesce Query Runner job. Select one to see its runs, newest first. A failed run shows why on its row. Select a run to open the Scheduler's log, save it to a file or copy the run ID. `/schedules` is read-only. To pause or delete a schedule, use the **Job Scheduler** page in the LUSID web app.