Skip to content

Suspending CronJobs

The Skpr CLI can suspend configured CronJobs so that new jobs are not started until you have resumed them.

An example of when it would be useful to suspend CronJobs would be to prevent them from being created during an application deployment. We have a blog post showing how this could be implemented via GitHub Actions.

CronJob suspension is recommended as only as a temporary measure while you should consider commenting or removing CronJobs from your Skpr configuration if you intend to do this any longer.

One the temporary measure is no longer required, you should resume the CronJobs on your environment.

Usage

$ skpr cron suspend dev -w
Waiting for cron to finish
All Cron tasks have been suspended.

More Information

$ skpr cron suspend --help
usage: skpr cron suspend [<flags>] <environment>

Suspend all Cron tasks

Flags:
      --help  Show context-sensitive help (also try --help-long and --help-man).
  -w, --wait  Wait for running cron tasks to complete

Args:
  <environment>  Environment name

What's next?

After Suspending CronJobs, consider one of the following: