Share via


JobServer.GetJobByID Method

Returns a job with the specified ID value.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Function GetJobByID ( _
    jobId As Guid _
) As Job
'Usage
Dim instance As JobServer 
Dim jobId As Guid 
Dim returnValue As Job 

returnValue = instance.GetJobByID(jobId)
public Job GetJobByID(
    Guid jobId
)
public:
Job^ GetJobByID(
    Guid jobId
)
member GetJobByID : 
        jobId:Guid -> Job
public function GetJobByID(
    jobId : Guid
) : Job

Parameters

  • jobId
    Type: System.Guid
    A Guid system object value that uniquely identifies the job.

Return Value

Type: Microsoft.SqlServer.Management.Smo.Agent.Job
A Job object that is identified by the specified Guid system object value.

Examples

Scheduling Automatic Administrative Tasks in SQL Server Agent

See Also

Reference

JobServer Class

Microsoft.SqlServer.Management.Smo.Agent Namespace

Other Resources

Automated Administration Tasks (SQL Server Agent)

sp_help_job (Transact-SQL)