Spec-Zone.ru › Nushell

job spawn for experimental

Spawn a background job and retrieve its ID.

Signature

> job spawn {flags} (closure)

Flags

  • --description, -d {string}: An optional description for this job.

Parameters

  • closure: The closure to run in another thread.

Input/output types:

input output
nothing int

Examples

Spawn a background job to do some time consuming work.

> job spawn { sleep 5sec; rm evidence.pdf }

Notes

Executes the provided closure in a background thread and registers this task in the background job table, which can be retrieved with job list.

This command returns the job id of the newly created job.

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/job_spawn.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API