Scheduling GitHub Copilot Agents
Published: November 15, 2026
4 min read
We usually start a coding agent by hand: open an issue, assign it, wait for a pull request. Recurring chores like dependency updates or documentation tidying don’t need that. A schedule can trigger the agent instead.
TL;DR
- A coding agent has no timer of its own. The schedule comes from somewhere else, and on GitHub that is usually GitHub Actions with a
scheduletrigger. - The workflow starts the agent (for example by creating an issue for it or calling its CLI), and the agent’s output arrives as a pull request.
- Keep each run small and keep a human review step before merging.
The basic idea
Two pieces are needed:
- A trigger that fires at a fixed time. In GitHub Actions this is a cron expression under
on: schedule. - A task for the agent: a prompt, an issue, or a script that tells it what to do.
The workflow is the glue. At the scheduled time it runs, prepares the task, and hands it to the agent. The agent does the work on a branch and opens a pull request for us to review.
A minimal workflow
The trigger part looks like this:
on:
# Weekly, Saturdays 03:17 UTC
schedule:
- cron: '17 3 * * 6'
# Also allow running it manually
workflow_dispatch:
The cron fields are minute, hour, day of month, month, and day of week. A few things worth knowing:
- Times are in UTC.
- Scheduled runs can be delayed when GitHub is busy, so avoid exact “top of the hour” times such as
0 * * * *. An odd minute like17is gentler. - Scheduled workflows only run from the default branch.
- In public repositories, GitHub disables scheduled workflows after a period of no repository activity, so a quiet repository may need a nudge.
Adding workflow_dispatch is a good habit. It lets you run the same job manually, which makes testing much faster than waiting for the next cron tick.
Handing the task to the agent
What the job does next depends on how you run the agent. Two common shapes:
- Create an issue and assign it to the agent. The workflow opens an issue with the instructions, and the Copilot coding agent picks it up like any other assigned issue.
- Run an agent from the workflow itself. The job installs an agent CLI, passes it a prompt, and then commits the result and opens a pull request.
Either way, give the job only the permissions it needs. Start with contents: read and add contents: write or pull-requests: write only on the steps that require it.
Making scheduled runs behave
A task that runs unattended needs a few guardrails:
- One unit of work per run. Processing a single item per week keeps the review queue manageable.
- Skip what is already handled. Check for an open pull request or an existing issue before creating another one, otherwise the same task piles up.
- Write precise prompts. Nobody is there to answer clarifying questions, so state the scope, the files it may touch, and what “done” means.
- Keep a human in the loop. The agent proposes a pull request; a person merges it.
- Watch secrets and cost. Scheduled agent runs consume Actions minutes and Copilot usage, so a very frequent schedule adds up.
Example: this blog
This blog uses the same pattern. A weekly workflow picks one draft post and starts an editorial agent that expands it and opens a pull request. Merging that pull request publishes the post. The schedule is just the cron line above; the rest is a normal pull request review.
Conclusion
Scheduling a Copilot agent is not a special feature so much as a combination of two familiar tools: a cron trigger in GitHub Actions and an agent that turns a task into a pull request. Start with a small, low-risk recurring chore, add workflow_dispatch so you can test it, and keep the review step. The details of tooling change quickly, so check the current GitHub documentation before relying on any specific option.