JobStep.Command JobStep.Command JobStep.Command Property

Definition

Gets or sets the command execution string for the job step.

public:
 property System::String ^ Command { System::String ^ get(); void set(System::String ^ value); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Standalone)]
public string Command { get; set; }
Public Property Command As String
Property Value

A String value that specifies the execution string for the job step.

Examples

Scheduling Automatic Administrative Tasks in SQL Server Agent

Remarks

The Command property specifies the execution string for a Microsoft SQL Server Agent job step. Failure or success of execution determines failure or success of the job step.

The text specified by the Command property is run by SQL Server Agent using the executable subsystem indicated by the JobStep object's SubSystem property. The syntax in the Command property is validated when the SubSystem property is specified.

Applies to