Optional
parent: Job<any>The parent job to which the new job should be attached. Defaults to the currently-active job if none given (assuming a stop parameter is provided).
Optional
stop: CleanupFnThe function to call to destroy the nested job. Defaults to the Job.end method of the new job if none is given (assuming a parent parameter is provided).
A new job. The job is a child job if any arguments are given, or a detached (parentless) job otherwise.
You should generally use start()
, parent.start()
or
root.start()
instead of this, unless you're creating a special kind of job
that needs a custom stop function.
Return a new Job. If either a parent parameter or stop function are given, the new job is linked to the parent.