Page History
...
Returns the task execution history for jobs.
SYNTAX
Get-JS7TaskHistory [[-Job] <String>] [[-WorkflowWorkflowPath] <String>] [[-OrderId] <String>] [[-DirectoryPosition] <String>] [[-RecursiveFolder] <String>] [ [-StateRecursive] <String>] [[-ExcludeJob] <String[<Hashtable>] >] [[-RegExRegularExpression] <String>] [[-DateFrom] <DateTime>] [[-DateTo] <DateTime>] [[-RelativeDateFrom] <String>] [[-RelativeDateTo] <String>] [[-Timezone] <TimeZoneInfo>] [[-TaskId] <Int32>] <Int32[[-Limit] ><Int32>] [-NormalCriticality] [-LimitMinorCriticality] <Int32>[-MajorCriticality] [-Successful] [-Failed] [-IncompleteInProgress] [<CommonParameters>]
DESCRIPTION
History information is returned for jobs from a JobScheduler JS7 Controller.
Task executions can be selected by job name, workflow, folder, history status etc.
The history information retured includes start time, end time, return code etc.
...
-Job <String>
Optionally specifies the path and name of a job for which task execution results are reported.
If the name of a job is specified then
This parameter requires use of the -Directory WorkflowPath parameter is used to determine specify the folder.
Otherwise the -Job parameter is assumed to include the full path and name of the job.
One of the parameters -Directory, -Workflow or -Job has to be specifiedworkflow
that includes the job.
Required? | false |
Position? | 1 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
WorkflowPath
-Workflow WorkflowPath <String>
Optionally specifies the path and name of a workflow that includes jobs.
If the name of a workflow is specified then the -Directory parameter is used to determine the folder.
Otherwise the -Workflow parameter is assumed to include the full path and name of the workflow.
One of the parameters -Directory, -Workflow or -Job has to be specified. for which the task history is reported. The task execution history optionally can futher
be limited by specifying the -Job parameter to limit results to a job in the given workflow.
Required? | Required? | false |
Position? | 2 | |
Default value | ||
Accept pipeline input? | true (ByPropertyName) | |
Accept wildcard characters? | false |
...
-OrderId <String>
Optionally specifies the identifier of an order to limit results to jobs that
correspond to the order's current statehave been executed for the given order.
Required? | false |
Position? | 3 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Position
-Directory Position <String>
Optionally specifies the folder for which jobs should be returned. The directory is determined
from the root folder, i.e. the "live" directoryposition in a workflow to limit results to jobs that
correspond to the given position in a workflow. This parameter requires use of the -OrderId parameter.
Required? | false |
Position? | 4 |
Default value/ | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Folder
-Recursive <SwitchParameter>Folder <String>
Optionally specifies the folder that includes workflows for which the task history should be returned.
Required? | false |
Position? | 5 |
Default value | / |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Recursive
-Recursive <SwitchParameter>
Specifies that any sub-folders should be looked up when used with the -Folder parameter.
Specifies that any sub-folders should be looked up when used with the -Directory parameter.
By default no sub-folders will be looked up for jobs.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
ExcludeJob
-State <String>
Specifies that only jobs are considered that an order is currently passing. This is identified by the
order's state attribute that corresponds to the job node's state attribute.
This parameter requires use of the -Workflow parameter. If used with the -OrderId parameter then
only jobs for that order are considered, otherwise jobs for any orders in the given workflow are considered. ExcludeJob <Hashtable>
This parameter accepts a hashmap of job names and optionally workflow paths that are excluded from the results.
If a workflow path is specified then all jobs of the given workflow are excluded.
Required? | false |
Position? | 6 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
RegularExpression
-RegularExpression <String>
Specifies a regular expression that filters the jobs to be returned.
The regular expression is applied to the job name.
Required? | false |
Position? | 57 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
DateFrom
-ExcludeJob <String[]>
This parameter accepts a single job path or an array of job paths that are excluded from the results. DateFrom <DateTime>
Specifies the date starting from which history items should be returned.
Consider that a UTC date has to be provided.
Default: Begin of the current day as a UTC date
Required? | false | |
Position? | 68 | |
Default valueAccept pipeline input? | true (ByPropertyName) | (Get-Date -Hour 0 -Minute 0 -Second 0).ToUniversalTime() |
Accept pipeline input? | true (ByPropertyName) | |
Accept Accept wildcard characters? | false |
...
DateTo
-RegEx <String>DateTo <DateTime>
Specifies a regular expression that filters the jobs to the date until which history items should be returned.
The regular expression is applied to the path and name of jobs. Consider that a UTC date has to be provided.
Default: End of the current day as a UTC date
Required? | false |
Position? | 79 |
Default value | (Get-Date -Hour 0 -Minute 0 -Second 0).AddDays(1).ToUniversalTime() |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
RelativeDateFrom
-DateFrom <DateTime>RelativeDateFrom <String>
Specifies the a relative date starting from which history items should be returned, e.
Consider that a UTC date has to be provided.
Default: Begin of the current day as a UTC date
Required? | false |
Position? | 8 |
Default value | (Get-Date -Hour 0 -Minute 0 -Second 0).ToUniversalTime() |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
DateTo
-DateTo <DateTime>
Specifies the date until which history items should be returned.
Consider that a UTC date has to be provided.
Default: End of the current day as a UTC date g.
* -1s, -2s: one second ago, two seconds ago
* -1m, -2m: one minute ago, two minutes ago
* -1h, -2h: one hour ago, two hours ago
* -1d, -2d: one day ago, two days ago
* -1w, -2w: one week ago, two weeks ago
* -1M, -2M: one month ago, two months ago
* -1y, -2y: one year ago, two years ago
Optionally a time offset can be specified, e.g. -1d+02:00, as otherwise midnight UTC is assumed.
Alternatively a timezone offset can be added, e.g. by using -1d+TZ, that is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.
This parameter takes precedence over the -DateFrom parameter.
Required? | false | |
Position? | 910 | |
Default value | (Get-Date -Hour 0 -Minute 0 -Second 0).AddDays(1).ToUniversalTime() | |
Accept pipeline input? | true (ByPropertyName) | |
Accept wildcard characters? | false |
...
RelativeDateTo
-RelativeDateFrom RelativeDateTo <String>
Specifies a relative date starting from until which history items should be returned, e.g.
* -1s, -2s: one second ago, two seconds ago
* -1m, -2m: one minute ago, two minutes ago
* -1h, -2h: one hour ago, two hours ago
* -1d, -2d: one day ago, two days ago
* -1w, -2w: one week ago, two weeks ago
* -1M, -2M: one month ago, two months ago
* -1y, -2y: one year ago, two years ago
Optionally a time offset can be specified, e.g. -1d+02:00, as otherwise midnight UTC is assumed.
Alternatively a timezone offset can be added, e.g. by using -1d+TZ, that is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.
This parameter takes precedence over the -DateFrom parameter.
Required? | false |
Position? | 1011 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Timezone
-RelativeDateTo <String>Timezone <TimeZoneInfo>
Specifies a relative date until which history items should be returned, the timezone to which dates should be converted in the history information.
A timezone can e.g.
* -1s, -2s: one second ago, two seconds ago
* -1m, -2m: one minute ago, two minutes ago
* -1h, -2h: one hour ago, two hours ago
* -1d, -2d: one day ago, two days ago
* -1w, -2w: one week ago, two weeks ago
* -1M, -2M: one month ago, two months ago
* -1y, -2y: one year ago, two years ago
Optionally a time offset can be specified, e.g. -1d+02:00, as otherwise midnight UTC is assumed.
Alternatively a timezone offset can be added, e.g. by using -1d+TZ, that is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.
This parameter takes precedence over the -DateFrom parameterbe specified like this:
Get-JSTaskHistory -Timezone (Get-Timezone -Id 'GMT Standard Time')
All dates in JobScheduler are UTC and can be converted e.g. to the local time zone like this:
Get-JSTaskHistory -Timezone (Get-Timezone)
Default: Dates are returned in UTC.
Required? | false |
Position? | 12 |
Default value | (Get-Timezone -Id 'UTC') |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
TaskId
-TaskId <Int32>
Specifies to report the execution history for the given task ID only.
Required? | false |
Position? | 13 |
Default value | 0 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Limit
-Limit <Int32>
Specifies the max. number of history items for task executions to be returned.
The default value is 10000, for an unlimited number of items the value -1 can be specified.
Required? | false | |
Position? | 11 | Default value |
Accept pipeline input? | true (ByPropertyName) | |
Accept wildcard characters? | false |
Timezone
14 | |
Default value | 0 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
NormalCriticality
-NormalCriticality <SwitchParameter>
Specifies to return the task history for jobs only that are assigned a "normal" criticality-Timezone <TimeZoneInfo>
Specifies the timezone to which dates should be converted in the history information.
A timezone can e.g. be specified like this:
Get-JSTaskHistory -Timezone (Get-Timezone -Id 'GMT Standard Time')
All dates in JobScheduler are UTC and can be converted e.g. to the local time zone like this:
Get-JSTaskHistory -Timezone (Get-Timezone)
Default: Dates are returned in UTC.
Required? | false |
Position? | 12named |
Default value | (Get-Timezone -Id 'UTC')False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
MinorCriticality
TaskId
-TaskId <Int32[]>
-MinorCriticality <SwitchParameter>
Specifies to return the task history for jobs only that are assigned a "minor" criticality.
Required? | false |
Position? | 13named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Limit
MajorCriticality
-MajorCriticality <SwitchParameter>
Specifies to return the task history for jobs only that are assigned a "major" criticality-Limit <Int32>
Specifies the max. number of history items for task executions to be returned.
The default value is 10000, for an unlimited number of items the value -1 can be specified.
Required? | false |
Position? | 14named |
Default value | 0False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
InProgress
-Incomplete InProgress <SwitchParameter>
Specifies that history information for running tasks should be returned.
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | falsenamed |
RELATED LINKS
EXAMPLES
-------------------------- EXAMPLE 1 --------------------------
PS > $items = Get-JS7TaskHistory
...
Default value | False |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
RELATED LINKS
EXAMPLES
-------------------------- EXAMPLE 2 1 --------------------------
PS > $items = Get-JS7TaskHistory -RegEx '^/sos'
Returns today's task execution history for any jobs from the /sos folder.
-------------------------- EXAMPLE 3 2 --------------------------
PS > $items = Get-JS7TaskHistory -RegEx 'report'RegularExpression "sos$"
Returns today's task execution history for any jobs that contain the string 'report' in the job pathwith a job name that ends with "sos".
-------------------------- EXAMPLE 4 3 --------------------------
...
-------------------------- EXAMPLE 5 4 --------------------------
...
-------------------------- EXAMPLE 6 5 --------------------------
...
-------------------------- EXAMPLE 7 6 --------------------------
PS > $items = Get-JS7TaskHistory -Workflow WorkflowPath /sos/dailyplan/CreateDailyPlansome_path/some_workflow
Returns today's task execution history for jobs in the given workflow.
-------------------------- EXAMPLE 8 7 --------------------------
PS > $items = Get-JS7TaskHistory -ExcludeJob /sos/dailyplan/CreateDailyPlan, /sos/housekeeping/scheduler_rotate_log@{ 'workflowPath'='/some_path/some_workflow'; 'job'='some_job' }
Returns today's task execution history for any jobs excluding the specified workflow paths and job pathsnames.
-------------------------- EXAMPLE 9 8 --------------------------
...
-------------------------- EXAMPLE 10 9 --------------------------
...
-------------------------- EXAMPLE 11 10 --------------------------
...
-------------------------- EXAMPLE 12 11 --------------------------
...
-------------------------- EXAMPLE 13 12 --------------------------
...
-------------------------- EXAMPLE 14 13 --------------------------
...
-------------------------- EXAMPLE 15 14 --------------------------
PS > $items = Get-JS7TaskHistory -Directory Folder /sos -Recursive -Successful -Failed
...