A GitHub (gh
) CLI extension to schedule gh CLI commands to run sometime in the future.
- ⏰ Avoid setting reminders for yourself to merge a PR at the end of the day if no one else comments on it
- ⏲️ Automatically close an issue after a few hours of inactivity
- 😪 Create a pull request automatically during normal business hours that you worked on in the middle of the night (😅)
- Install the
gh
CLI - see the installation guide
Installation requires a minimum version (2.0.0) of the the GitHub CLI that supports extensions.
- Install this extension:
gh extension install philip-gai/gh-scheduler
Run:
gh scheduler
Schedule something:
<gh_cli_cmd> in <duration>
<gh_cli_cmd>
: This can be any gh cli command, such asgh pr merge <url> --auto --squash
orgh issue close <url>
, or anything else you might want to schedule.<duration>
: A duration string is a sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If you leave of the duration, the job will run immediately.
Note that exiting out of the scheduler or killing the terminal session will kill the scheduler and all of its jobs. You must keep the session open for jobs to get processed.