Table of Contents

Start-AdtJob

Synopsis

Runs adTempus jobs.

Syntax

Job (Default)

Start-AdtJob [-Job] <Job[]> [-Variable <hashtable>] [-Step <string>] [-Checkpoint <string>]
 [-Comment <string>] [-IgnoreJobConditions] [-IgnoreStepConditions] [-NoForce] [-ForceController]
 [-ControllerOnly] [-Agent <string[]>] [-Responses <ExecutionResponseBehavior>] [-NoCycleId] [-Wait]
 [-Timeout <timespan>] [-PollInterval <timespan>] [-ShowMessages] [-Connection <AdtConnection>]
 [-Server <string>] [-Credential <pscredential>] [-WhatIf] [-Confirm]

Name

Start-AdtJob [-Name] <string[]> [-Variable <hashtable>] [-Step <string>] [-Checkpoint <string>]
 [-Comment <string>] [-IgnoreJobConditions] [-IgnoreStepConditions] [-NoForce] [-ForceController]
 [-ControllerOnly] [-Agent <string[]>] [-Responses <ExecutionResponseBehavior>] [-NoCycleId] [-Wait]
 [-Timeout <timespan>] [-PollInterval <timespan>] [-ShowMessages] [-Connection <AdtConnection>]
 [-Server <string>] [-Credential <pscredential>] [-WhatIf] [-Confirm]

Id

Start-AdtJob -Id <guid[]> [-Variable <hashtable>] [-Step <string>] [-Checkpoint <string>]
 [-Comment <string>] [-IgnoreJobConditions] [-IgnoreStepConditions] [-NoForce] [-ForceController]
 [-ControllerOnly] [-Agent <string[]>] [-Responses <ExecutionResponseBehavior>] [-NoCycleId] [-Wait]
 [-Timeout <timespan>] [-PollInterval <timespan>] [-ShowMessages] [-Connection <AdtConnection>]
 [-Server <string>] [-Credential <pscredential>] [-WhatIf] [-Confirm]

Description

Submits jobs for execution and returns the instances that were started. Jobs can be piped from Get-AdtJob or specified by name or ID. A name must identify a single job; if more than one job matches, an error lists the matching jobs.

Use -Wait to wait for the instances to finish. When waiting, an error with ID JobFailed is written for each instance that finishes with a failure status, and an error with ID WaitTimeout is written if the -Timeout elapses.

Examples

Example 1

Get-AdtJob 'Nightly\*' | Start-AdtJob -Variable @{Source='PS'} -Wait -Timeout 01:00:00

Runs all jobs in the Nightly group with a job variable, and waits up to an hour for them to finish.

Example 2

Start-AdtJob 'Finance\Load' -Step 2-4 -Wait -ShowMessages

Runs steps 2 through 4 of a job and displays its log messages while waiting.

Parameters

-Agent

The names of the Agents to run the job on.

TypeString[]
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersTrue

-Checkpoint

The checkpoint value passed to the job.

TypeString
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Comment

Comments recorded in the job history.

TypeString
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Confirm

Prompts you for confirmation before running the cmdlet.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse
Aliasescf

-Connection

The connection to use. See Connect-AdtServer.

TypeAdtConnection
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-ControllerOnly

Runs the job on the Controller only, never on Agents.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Credential

The credential used to connect to the -Server.

TypePSCredential
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-ForceController

Runs the job on the Controller, even if it is configured to run on Agents.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Id

The IDs of the jobs to run.

TypeGuid[]
Parameter setsId
RequiredTrue
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-IgnoreJobConditions

Determines whether job-level conditions are ignored. The default is $true; specify -IgnoreJobConditions:$false to evaluate them.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueTrue
Accept pipeline inputFalse
Accept wildcard charactersFalse

-IgnoreStepConditions

Ignores step-level conditions.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Job

The jobs to run.

TypeJob[]
Parameter setsJob
RequiredTrue
Position0
Default valueNone
Accept pipeline inputTrue (ByValue)
Accept wildcard charactersFalse

-Name

The names of the jobs to run. See Get-AdtJob for the name format.

TypeString[]
Parameter setsName
RequiredTrue
Position0
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-NoCycleId

Does not update the job's cycle ID.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-NoForce

Does not start a new instance if the job is already running. By default a new instance is always started.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-PollInterval

How often to check the instances while waiting. The default is 5 seconds.

TypeTimeSpan
RequiredFalse
PositionNamed
Default value00:00:05
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Responses

Which responses are executed: All (the default), None, or NoJobControl.

TypeExecutionResponseBehavior
RequiredFalse
PositionNamed
Default valueAll
Accept pipeline inputFalse
Accept wildcard charactersFalse
Accepted valuesAll, None, NoJobControl

-Server

The server to connect to, if no connection is specified.

TypeString
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-ShowMessages

Writes the job's log messages to the information stream while waiting.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Step

The steps to run, such as "2-4", "3-" (step 3 to the end), "-3" (steps 1 to 3), or "1,3,5".

TypeString
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Timeout

The maximum time to wait, with -Wait. The default is to wait indefinitely.

TypeTimeSpan
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Variable

Job variables to set for the run, as a hashtable of names and values.

TypeHashtable
RequiredFalse
PositionNamed
Default valueNone
Accept pipeline inputFalse
Accept wildcard charactersFalse

-Wait

Waits for the instances to finish.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

TypeSwitchParameter
RequiredFalse
PositionNamed
Default valueFalse
Accept pipeline inputFalse
Accept wildcard charactersFalse
Aliaseswi

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

ArcanaDevelopment.adTempus.Client.Job[]

Jobs from Get-AdtJob.

Outputs

ArcanaDevelopment.adTempus.Client.ExecutionHistoryItem

A job instance (one run of a job).

Notes

This cmdlet uses the connection that fetched the objects piped to it. Otherwise it uses the connection given by -Connection, or a connection to -Server (reused if one is already open for the same server and user), or the default connection. If no connection is open, it connects to the local server using Windows authentication. See Connect-AdtServer.