Compartilhar via


PSJobProxy.StartJob Method

Definition

Overloads

StartJob()

start a job. The job will be started with the parameters specified in StartParameters

StartJob(PSDataCollection<Object>)

Start execution of the job with the specified input. This input will serve as input to the underlying pipeline

StartJob(EventHandler<JobDataAddedEventArgs>, EventHandler<JobStateEventArgs>, PSDataCollection<Object>)

Start execution of the workflow with the specified input. This input will serve as input to the underlying pipeline. Because the number of child jobs is unknown before starting the job, delegates may be indicated to ensure that no events will be missed after the child job is created if data begins streaming back immediately.

StartJob()

start a job. The job will be started with the parameters specified in StartParameters

public:
 override void StartJob();
public:
 override void StartJob();
 override void StartJob();
public override void StartJob ();
override this.StartJob : unit -> unit
Public Overrides Sub StartJob ()

Exceptions

Thrown if the job is already running, if there is no runspace or runspace pool assigned.

Thrown if the job is otherwise started, finished, or suspended.

Thrown if job is disposed.

Applies to

StartJob(PSDataCollection<Object>)

Start execution of the job with the specified input. This input will serve as input to the underlying pipeline

public:
 void StartJob(System::Management::Automation::PSDataCollection<System::Object ^> ^ input);
public void StartJob (System.Management.Automation.PSDataCollection<object> input);
override this.StartJob : System.Management.Automation.PSDataCollection<obj> -> unit
Public Sub StartJob (input As PSDataCollection(Of Object))

Parameters

Remarks

Not sure if this method is needed. This has been added just to be in sync with the PowerShell APIs

Applies to

StartJob(EventHandler<JobDataAddedEventArgs>, EventHandler<JobStateEventArgs>, PSDataCollection<Object>)

Start execution of the workflow with the specified input. This input will serve as input to the underlying pipeline. Because the number of child jobs is unknown before starting the job, delegates may be indicated to ensure that no events will be missed after the child job is created if data begins streaming back immediately.

public:
 void StartJob(EventHandler<System::Management::Automation::JobDataAddedEventArgs ^> ^ dataAdded, EventHandler<System::Management::Automation::JobStateEventArgs ^> ^ stateChanged, System::Management::Automation::PSDataCollection<System::Object ^> ^ input);
public void StartJob (EventHandler<System.Management.Automation.JobDataAddedEventArgs> dataAdded, EventHandler<System.Management.Automation.JobStateEventArgs> stateChanged, System.Management.Automation.PSDataCollection<object> input);
override this.StartJob : EventHandler<System.Management.Automation.JobDataAddedEventArgs> * EventHandler<System.Management.Automation.JobStateEventArgs> * System.Management.Automation.PSDataCollection<obj> -> unit
Public Sub StartJob (dataAdded As EventHandler(Of JobDataAddedEventArgs), stateChanged As EventHandler(Of JobStateEventArgs), input As PSDataCollection(Of Object))

Parameters

dataAdded
EventHandler<JobDataAddedEventArgs>

delegate used to subscribe to data added events on the child jobs

stateChanged
EventHandler<JobStateEventArgs>

delegate used to subscribe to state changed events on the child jobs

input
PSDataCollection<Object>

collection of input objects

Applies to