Find jobs not run in the last X days

Language: PowerShell

View on GitHub to download or comment.

See the Client API Examples Introduction for additional information and prerequisites.

Samples index

This PowerShell script uses the adTempus API to find all jobs on an adTempus server that have not been run within the last x days, or that have never been run at all.

Use the -days parameter to specify x (default is 180).

Use -server to connect to an adTempus instance other than the local instance.

See this forum post for more information.

param (
    [string]$server = ".",
    [int]$days = 180
add-type -path "c:\program files\arcana development\adtempus\4.0\ArcanaDevelopment.adTempus.Client.dll"


$context.GetJobs("*",[ArcanaDevelopment.adTempus.Shared.ObjectFetchOptions]::StubsOnly,0,[ref] $restartPaging)   | 
Select-Object Name,@{n="GroupName";e={if($_.Group.IsRootGroup) {""} else{$_.Group.FullyQualifiedName}}},@{n="LastStart";e={$_.JobStatus.ExecutionStart}},@{n="JobId";e={$_.OID.ObjectID}}    |
Sort-Object -Property GroupName,Name


View on GitHub to comment.