{"meta":{"title":"Scheduling prompts in GitHub Copilot CLI","intro":"Use the /every and /after slash commands to submit a prompt to Copilot on a recurring schedule, or after a specified delay.","product":"GitHub Copilot","breadcrumbs":[{"href":"/en/enterprise-cloud@latest/copilot","title":"GitHub Copilot"},{"href":"/en/enterprise-cloud@latest/copilot/how-tos","title":"How-tos"},{"href":"/en/enterprise-cloud@latest/copilot/how-tos/copilot-cli","title":"Copilot CLI"},{"href":"/en/enterprise-cloud@latest/copilot/how-tos/copilot-cli/automate-copilot-cli","title":"Automate with Copilot CLI"},{"href":"/en/enterprise-cloud@latest/copilot/how-tos/copilot-cli/automate-copilot-cli/schedule-prompts","title":"Schedule prompts"}],"documentType":"article"},"body":"# Scheduling prompts in GitHub Copilot CLI\n\nUse the /every and /after slash commands to submit a prompt to Copilot on a recurring schedule, or after a specified delay.\n\n> \\[!NOTE]\n> The `/every` and `/after` commands are currently experimental features and are only available if you have used the `/experimental on` slash command, or the `‑‑experimental` command line option.\n\nIn an interactive Copilot CLI session you can schedule a prompt to be submitted automatically. This is useful when you want Copilot to repeat a task at a regular cadence or to perform a one-off task after a delay, without you having to remember to submit the prompt manually.\n\nThere are two slash commands for this:\n\n* `/every` — schedule a prompt to be sent **repeatedly** at a fixed interval.\n* `/after` — schedule a prompt to be sent **once**, after a specified period of time.\n\nBoth commands are only available inside an interactive Copilot CLI session: the schedules fire only while the session in which they were created is running. For ways to run Copilot CLI on a schedule when no session is open, see [Running a prompt from an external scheduler](#running-a-prompt-from-an-external-scheduler) at the end of this article.\n\n## Scheduling a recurring prompt with `/every`\n\nIn an interactive Copilot CLI session, type `/every` followed by an interval of time and the prompt you want to be submitted.\n\n```copilot\n/every INTERVAL PROMPT\n```\n\nThe prompt will be submitted after the interval you specified has elapsed and then again on the same cadence until you delete the schedule entry or you end the interactive CLI session.\n\n### Examples\n\n```copilot\n/every 1h run the test suite and summarize any new failures\n```\n\n```copilot\n/every 30m check for new comments on my open pull requests\n```\n\n> \\[!NOTE]\n> `/loop` is an alias of `/every`. So you can enter `/loop` instead of `/every`, if you prefer, and the effect is the same.\n\n## Scheduling a once-only prompt with `/after`\n\nType `/after` followed by a delay and the prompt you want to submit:\n\n```copilot\n/after DELAY PROMPT\n```\n\nThe prompt fires once, after the delay has elapsed, and is then removed from the schedule list.\n\n### Examples\n\n```copilot\n/after 30m Give me details of changes to README.md made in the last 30 minutes\n```\n\n```copilot\n/after 10m Check that the address finder is visible on example.com/register\n```\n\n## Scheduling a skill\n\nYou can use `/every` and `/after` to schedule a skill. To do this, you can reference the skill explicitly by using its slash command, or you can use natural language to tell Copilot to run the skill.\n\n> \\[!NOTE]\n> Only user-invocable skills can be scheduled this way. You cannot include built-in slash commands (such as `/clear`) in a scheduled prompt.\n\n### Examples\n\n```copilot\n/after 2h Use the docx skill to create a new file summarizing recent changes to this repo\n```\n\n```copilot\n/every 1d /refactor-plan Adjust the architecture of this project to improve the responsiveness of the client UI\n```\n\n## Interval and delay syntax\n\n| Suffix | Unit    | Example |\n| ------ | ------- | ------- |\n| `s`    | seconds | `30s`   |\n| `m`    | minutes | `5m`    |\n| `h`    | hours   | `2h`    |\n| `d`    | days    | `1d`    |\n\nA bare number with no suffix is interpreted as minutes—for example, `/every 30 remind me to check for Slack messages` schedules the prompt every 30 minutes.\n\nThe minimum interval is **10 seconds** and the maximum is **1 day** (24 hours).\n\n## Identifying scheduled prompts in the session\n\nWhen a scheduled prompt is triggered, Copilot precedes the prompt with text such as `[Scheduled prompt #4]` to distinguish it from a prompt you typed yourself.\n\nYou can use the ID to cancel the schedule. For example, by entering `stop prompt 4`.\n\n## Managing scheduled prompts\n\nTo list the active schedules for the current session, type `/every` or `/after` with no arguments.\n\nTo delete a schedule, use the arrow keys on your keyboard to move through the list and select the schedule you want to delete, then press <kbd>d</kbd>.\n\nPress <kbd>Esc</kbd> to exit the schedule list.\n\n## What happens when you close and reopen a session\n\nScheduled prompts are scoped to the session they were created in, and they are only triggered while that session is running.\n\nWhen you reopen the session (using the `--continue` or `--resume` command line options) the schedules are restarted, with interval before a schedule is triggered measured from the moment you reopen the session.\n\nIf an `/after` schedule had not been triggered before you closed the session, it remains in the schedule list and will be triggered after the specified delay in the reopened session.\n\n## Running a prompt from an external scheduler\n\nThe `/every` and `/after` commands only run while an interactive Copilot CLI session is open. If you want a prompt to run on a schedule even when no session is active, you can run Copilot CLI from an external scheduler such as **cron** on macOS or Linux, or **Task Scheduler** on Windows.\n\nTo run Copilot CLI programmatically, use the syntax `copilot -p \"YOUR PROMPT\"`. The CLI processes your prompt without displaying the interactive interface and then exits.\n\nThis is useful for tasks such as:\n\n* **Nightly maintenance** — for example, running your test suite against the latest changes on a branch every night and posting a summary to a tracking issue.\n* **Periodic dependency checks** — for example, opening a weekly pull request that updates dependencies and runs the test suite against the result.\n* **Scheduled reports** — for example, generating a daily summary of new issues or pull requests assigned to you and emailing or posting it to a chat channel.\n\nFor more information, see [Running GitHub Copilot CLI programmatically](/en/enterprise-cloud@latest/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically).\n\n## Further reading\n\n* [GitHub Copilot CLI command reference](/en/enterprise-cloud@latest/copilot/reference/copilot-cli-reference/cli-command-reference#slash-commands-in-the-interactive-interface)"}