heroku-cron
v1.3.1
Published
Heroku CLI plugin for Cron To Go
Downloads
116
Maintainers
Readme
Cron To Go Scheduler: Run scheduled tasks on your Heroku Apps
Cron To Go allows you to schedule virtually any job on your Heroku applications.
heroku-cli-plugin-cron
Heroku CLI plugin for Cron To Go Scheduler Heroku add-on
You can read more about Cron To Go Scheduler on Dev Center.
Installation
$ heroku plugins:install heroku-cron
Usage
$ npm install -g heroku-cron
$ heroku COMMAND
running command...
$ heroku (--version|-v)
heroku-cron/1.3.1 darwin-x64 node-v20.11.1
$ heroku --help [COMMAND]
USAGE
$ heroku COMMAND
...
Commands
heroku cron
heroku cron:jobs
heroku cron:jobs:clear
heroku cron:jobs:create
heroku cron:jobs:delete JOB
heroku cron:jobs:export FILENAME
heroku cron:jobs:import FILENAME
heroku cron:jobs:info JOB
heroku cron:jobs:logs JOB
heroku cron:jobs:pause JOB
heroku cron:jobs:resume JOB
heroku cron:jobs:run JOB
heroku cron:jobs:trigger JOB
heroku cron:jobs:update JOB
heroku cron
get information about Cron To Go
USAGE
$ heroku cron -a <value> [-r <value>] [--json]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--json return the results as JSON
DESCRIPTION
get information about Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron -a your-app
$ heroku cron --app your-app --json
See code: src/commands/cron/index.ts
heroku cron:jobs
list jobs on Cron To Go
USAGE
$ heroku cron:jobs -a <value> [-r <value>] [--json] [--columns <value>] [-x] [--no-header | [--csv |
--no-truncate]]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
-x, --extended show extra columns
--columns=<value> only show provided columns (comma-seperated)
--csv output in CSV format
--json return the results as JSON
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
DESCRIPTION
list jobs on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs -a your-app
$ heroku cron:jobs --app your-app --json
$ heroku cron:jobs --app=your-app --csv
See code: src/commands/cron/jobs/index.ts
heroku cron:jobs:clear
delete all jobs on Cron To Go
USAGE
$ heroku cron:jobs:clear -a <value> [-r <value>] [--confirm <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--confirm=<value> confirms deleting all jobs if passed in
DESCRIPTION
delete all jobs on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:clear -a your-app
$ heroku cron:jobs:clear --app your-app
$ heroku cron:jobs:clear --app your-app --confirm your-app
See code: src/commands/cron/jobs/clear.ts
heroku cron:jobs:create
create a job on Cron To Go
USAGE
$ heroku cron:jobs:create -a <value> [-r <value>] [--json] [--nickname <value>] [--schedule <value>] [--timezone
<value>] [--command <value>] [--dyno Eco|Basic|Standard-1X|Standard-2X|Performance-M|Performance-L|Performance-L-RAM
|Performance-XL|Performance-2XL|Private-S|Private-M|Private-L|Private-L-RAM|Private-XL|Private-2XL] [--timeout
<value>] [--state enabled|paused] [--retries <value>] [--jitter <value>]
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--command=<value> command to run as a one-off dyno either as the command to execute, or a process type that is
present in your apps's Procfile
--dyno=<option> size of the one-off dyno
<options: Eco|Basic|Standard-1X|Standard-2X|Performance-M|Performance-L|Performance-L-RAM|Perfor
mance-XL|Performance-2XL|Private-S|Private-M|Private-L|Private-L-RAM|Private-XL|Private-2XL>
--jitter=<value> the amount of jitter to add to the schedule, in minutes
--json return the results as JSON
--nickname=<value> nickname of the job. Leave blank to use the job command
--retries=<value> number of attempts to make to run a job using the exponential back-off procedure
--schedule=<value> schedule of the job specified using unix-cron or rate expression format. The minimum precision
is 1 minute
--state=<option> state of the job
<options: enabled|paused>
--timeout=<value> number of seconds until the one-off dyno expires, after which it will soon be killed
--timezone=<value> time zone of the job. UTC time zone is recommended for avoiding daylight savings time issues
DESCRIPTION
create a job on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:create -a your-app
$ heroku cron:jobs:create --app your-app
See code: src/commands/cron/jobs/create.ts
heroku cron:jobs:delete JOB
delete job on Cron To Go
USAGE
$ heroku cron:jobs:delete [JOB] -a <value> [-r <value>] [--confirm <value>]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--confirm=<value> confirms deleting the job if passed in
DESCRIPTION
delete job on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:delete 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:delete 01234567-89ab-cdef-0123-456789abcdef --app your-app
$ heroku cron:jobs:delete 01234567-89ab-cdef-0123-456789abcdef --app your-app --confirm 01234567-89ab-cdef-0123-456789abcdef
See code: src/commands/cron/jobs/delete.ts
heroku cron:jobs:export FILENAME
export jobs from Cron To Go to a manifest file
USAGE
$ heroku cron:jobs:export [FILENAME] -a <value> [-r <value>] [--with-id]
ARGUMENTS
FILENAME manifest file path
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--with-id include job ID in the exported manifest file
DESCRIPTION
export jobs from Cron To Go to a [manifest
file](https://github.com/crazyantlabs/heroku-cli-plugin-cron/blob/main/examples/manifest.yml)
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:export manifest.yml -a your-app
$ heroku cron:jobs:export /tmp/manifest.yml --app your-app
$ heroku cron:jobs:export /tmp/manifest.yml --with-id --app your-app
See code: src/commands/cron/jobs/export.ts
heroku cron:jobs:import FILENAME
import jobs into Cron To Go using a manifest file
USAGE
$ heroku cron:jobs:import [FILENAME] -a <value> [-r <value>] [--delete] [--confirm <value>]
ARGUMENTS
FILENAME manifest file path
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--confirm=<value> confirms deleting all jobs prior to applying manifest file if passed in
--delete delete all jobs prior to applying manifest file
DESCRIPTION
import jobs into Cron To Go using a [manifest
file](https://github.com/crazyantlabs/heroku-cli-plugin-cron/blob/main/examples/manifest.yml)
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:import manifest.yml -a your-app
$ heroku cron:jobs:import manifest.yml --app your-app
$ heroku cron:jobs:import manifest.yml --app your-app --delete
$ heroku cron:jobs:import manifest.yml --app your-app --delete --confirm your-app
See code: src/commands/cron/jobs/import.ts
heroku cron:jobs:info JOB
get information about a job on Cron To Go
USAGE
$ heroku cron:jobs:info [JOB] -a <value> [-r <value>] [--json]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--json return the results as JSON
DESCRIPTION
get information about a job on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:info 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:info 01234567-89ab-cdef-0123-456789abcdef --app your-app --json
See code: src/commands/cron/jobs/info.ts
heroku cron:jobs:logs JOB
display job recent log output on Cron To Go
USAGE
$ heroku cron:jobs:logs [JOB] -a <value> [-r <value>] [-e <value>] [-n <value>] [-t] [--force-colors]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-e, --execution=<value> only show output from this job execution
-n, --num=<value> [default: 100] number of lines to display
-r, --remote=<value> git remote of app to use
-t, --tail continually stream logs
--force-colors force use of colors (even on non-tty output)
DESCRIPTION
display job recent log output on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:logs 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:logs 01234567-89ab-cdef-0123-456789abcdef -a your-app --num 100
$ heroku cron:jobs:logs 01234567-89ab-cdef-0123-456789abcdef --app your-app --tail
See code: src/commands/cron/jobs/logs.ts
heroku cron:jobs:pause JOB
pause job on Cron To Go
USAGE
$ heroku cron:jobs:pause [JOB] -a <value> [-r <value>]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
pause job on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:pause 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:pause 01234567-89ab-cdef-0123-456789abcdef --app your-app
See code: src/commands/cron/jobs/pause.ts
heroku cron:jobs:resume JOB
resume job on Cron To Go
USAGE
$ heroku cron:jobs:resume [JOB] -a <value> [-r <value>]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
DESCRIPTION
resume job on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:resume 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:resume 01234567-89ab-cdef-0123-456789abcdef --app your-app
See code: src/commands/cron/jobs/resume.ts
heroku cron:jobs:run JOB
trigger job execution on Cron To Go
USAGE
$ heroku cron:jobs:run [JOB] -a <value> [-r <value>] [--json] [-t] [--confirm <value>]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
-t, --tail continually stream job logs
--confirm=<value> confirms running the job if passed in
--json return the results as JSON
DESCRIPTION
trigger job execution on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
ALIASES
$ heroku cron:jobs:trigger
EXAMPLES
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef -a your-app --json
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef --app your-app
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef --app your-app --tail
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef --app your-app --tail --confirm 01234567-89ab-cdef-0123-456789abcdef
See code: src/commands/cron/jobs/run.ts
heroku cron:jobs:trigger JOB
trigger job execution on Cron To Go
USAGE
$ heroku cron:jobs:trigger [JOB] -a <value> [-r <value>] [--json] [-t] [--confirm <value>]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
-t, --tail continually stream job logs
--confirm=<value> confirms running the job if passed in
--json return the results as JSON
DESCRIPTION
trigger job execution on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
ALIASES
$ heroku cron:jobs:trigger
EXAMPLES
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef -a your-app
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef -a your-app --json
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef --app your-app
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef --app your-app --tail
$ heroku cron:jobs:run 01234567-89ab-cdef-0123-456789abcdef --app your-app --tail --confirm 01234567-89ab-cdef-0123-456789abcdef
heroku cron:jobs:update JOB
update a job on Cron To Go
USAGE
$ heroku cron:jobs:update [JOB] -a <value> [-r <value>] [--json] [--nickname <value>] [--schedule <value>]
[--timezone <value>] [--command <value>] [--dyno Eco|Basic|Standard-1X|Standard-2X|Performance-M|Performance-L|Perfo
rmance-L-RAM|Performance-XL|Performance-2XL|Private-S|Private-M|Private-L|Private-L-RAM|Private-XL|Private-2XL]
[--timeout <value>] [--state enabled|paused] [--retries <value>] [--jitter <value>]
ARGUMENTS
JOB unique ID of the job
FLAGS
-a, --app=<value> (required) app to run command against
-r, --remote=<value> git remote of app to use
--command=<value> command to run as a one-off dyno either as the command to execute, or a process type that is
present in your apps's Procfile
--dyno=<option> size of the one-off dyno
<options: Eco|Basic|Standard-1X|Standard-2X|Performance-M|Performance-L|Performance-L-RAM|Perfor
mance-XL|Performance-2XL|Private-S|Private-M|Private-L|Private-L-RAM|Private-XL|Private-2XL>
--jitter=<value> the amount of jitter to add to the schedule, in minutes
--json return the results as JSON
--nickname=<value> nickname of the job. Leave blank to use the job command
--retries=<value> number of attempts to make to run a job using the exponential back-off procedure
--schedule=<value> schedule of the job specified using unix-cron or rate expression format. The minimum precision
is 1 minute
--state=<option> state of the job
<options: enabled|paused>
--timeout=<value> number of seconds until the one-off dyno expires, after which it will soon be killed
--timezone=<value> time zone of the job. UTC time zone is recommended for avoiding daylight savings time issues
DESCRIPTION
update a job on Cron To Go
Read more about this feature at https://devcenter.heroku.com/articles/crontogo
EXAMPLES
$ heroku cron:jobs:update -a your-app
$ heroku cron:jobs:update --app your-app
See code: src/commands/cron/jobs/update.ts