Skip to main content
Version: 0.6.10

swcli job

Overview​

swcli [GLOBAL OPTIONS] job [OPTIONS] <SUBCOMMAND> [ARGS]...

The job command includes the following subcommands:

  • cancel
  • info
  • list(ls)
  • pause
  • recover
  • remove(rm)
  • resume

swcli job cancel​

swcli [GLOBAL OPTIONS] job cancel [OPTIONS] <JOB>

job cancel stops the specified job. On Standalone instance, this command only takes effect for containerized jobs.

JOB is a job URI.

OptionRequiredTypeDefaultsDescription
--force or -fNBooleanFalseIf true, kill the Starwhale Job by force.

swcli job info​

swcli [GLOBAL OPTIONS] job info [OPTIONS] <JOB>

job info outputs detailed information about the specified Starwhale Job.

JOB is a job URI.

swcli job list​

swcli [GLOBAL OPTIONS] job list [OPTIONS]

job list shows all Starwhale Jobs.

OptionRequiredTypeDefaultsDescription
--projectNStringThe URI of the project to list. Use the default project if not specified.
--show-removed or -srNBooleanFalseIf true, include packages that are removed but not garbage collected.
--pageNInteger1The starting page number. Server and cloud instances only.
--sizeNInteger20The number of items in one page. Server and cloud instances only.

swcli job pause​

swcli [GLOBAL OPTIONS] job pause [OPTIONS] <JOB>

job pause pauses the specified job. Paused jobs can be resumed by job resume. On Standalone instance, this command only takes effect for containerized jobs.

JOB is a job URI.

From Starwhale's perspective, pause is almost the same as cancel, except that the job reuses the old Job id when resumed. It is job developer's responsibility to save all data periodically and load them when resumed. The job id is usually used as a key of the checkpoint.

OptionRequiredTypeDefaultsDescription
--force or -fNBooleanFalseIf true, kill the Starwhale Job by force.

swcli job resume​

swcli [GLOBAL OPTIONS] job resume [OPTIONS] <JOB>

job resume resumes the specified job. On Standalone instance, this command only takes effect for containerized jobs.

JOB is a job URI.