Scheduling a merge: a GitHub Actions cron job vs Merge Scheduler
A scheduled GitHub Actions workflow is the first thing most developers try. It works, and for one repository and a simple merge it can be enough. This page lists what you have to build around it, and where the edges are.
The cron workflow
A workflow with a schedule trigger runs on the default branch at a time you write in cron syntax. A job in it runs gh pr merge for the pull request you name.
- Good: free, in your own repository, no third-party app.
- Times are in UTC, and scheduled runs can start late when GitHub is busy.
- The schedule lives in a file on the default branch. Each new release means editing it, or passing the pull request number some other way.
- Scheduled workflows in public repositories can be switched off after a period without repository activity.
Things you have to add yourself
- Pin the commit: the workflow merges whatever the branch holds at that moment, including a push made after review, unless you compare the commit yourself.
- Re-check conflicts, required checks and approvals right before merging.
- Use a personal access token or a GitHub App token to merge. Events caused by the default workflow token do not start other workflows, so a deploy that listens for a push to main may not run.
- Find the deploy run for the merge commit and watch it to the end.
- On failure, open and merge a revert pull request, then wait for the redeploy.
- Tell people what happened, with the failed step and error lines.
What Merge Scheduler does instead
You pick the pull request and the time in the app. It pins the commit, re-checks everything at merge time, merges, watches the GitHub Actions deploy, emails the result, and can revert a failed deploy. The first 10 releases on the Free plan include auto-revert. Ordered multi-repo releases, health checks and the dashboard are on Pro.
Quick comparison
| Cron workflow | Merge Scheduler | |
|---|---|---|
| Cost | Free (Actions minutes) | Free plan; Pro from the pricing page |
| Setup | Write and maintain a workflow | Install the GitHub App, choose repos |
| Skips the merge if someone pushes after review | Only if you code it | Yes, the commit is pinned |
| Watches the deploy | Only if you code it | Yes |
| Reverts a failed deploy | Only if you code it | Yes (first 10 releases free, then Pro) |
| Backend then frontend, in order | Chain workflows yourself | Yes (Pro) |
| Your code stays in your repo | Yes | Yes, it does not store your code |
Which to choose
One repository, a merge you rarely schedule and a deploy you are happy to check by hand: the cron workflow is fine. Releases outside working hours that you want merged, watched and rolled back without staying up: that is the case Merge Scheduler was built for. They also work together, since the deploy can stay an ordinary Actions workflow.
Do this in Merge Scheduler: Schedule your first merge
Related: GitHub auto-merge, merge queue and scheduled merge: what each is for · Merge Scheduler vs Merge Freeze: blocking merges vs performing them