ITeamFoundationJobService.QueueDelayedJob Method (TeamFoundationJobDefinition, Int32)

Schedules a job to be executed in the near future.

Namespace:  Microsoft.TeamFoundation.Framework.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

int QueueDelayedJob(
	TeamFoundationJobDefinition job,
	int maxDelaySeconds
)

Parameters

job
Type: Microsoft.TeamFoundation.Framework.Client.TeamFoundationJobDefinition

The job definition to schedule for execution.

maxDelaySeconds
Type: System.Int32

The number of seconds to delay the start of the job.

Return Value

Type: System.Int32
Returns 1 if the job was successfully queued; otherwise, returns 0.

QueueDelayedJob will only cause a job to run sooner or will have no effect. It will never postpone a job that is already scheduled to be executed in the near future.

Show: