Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

History information is returned for jobs from a 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.

The following REST Web Service API resources are used:

* /tasks/history

PARAMETERS

Job

-Job <String>
Optionally specifies the name of a job for which task execution results are reported.

This parameter requires use of the -WorkflowPath parameter to specify the workflow
that includes the job.

...

-DateFrom <DateTime>
Specifies the date starting from which history items should be returned.
Consider that a UTC date has to be provided.

Default: Begin Beginning of the current day as a UTC date

...

-RelativeDateFrom <String>
Specifies a relative date starting from 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 . This is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.

This parameter takes precedence over the -DateFrom parameter.

...

-RelativeDateTo <String>
Specifies a relative date 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 . This is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.

This parameter takes precedence over the -DateFrom parameter.

...

-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 JS7 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.

...

TaskId

-TaskId <Int32>
Specifies to report that the execution history should only be reported for the given task ID only.

Required?false
Position?11
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-NormalCriticality <SwitchParameter>
Specifies to return that the task history should only be returned for jobs only that are assigned a "normal" criticality.

...

-MinorCriticality <SwitchParameter>
Specifies to return that the task history should only be returned for jobs only that are assigned a "minor" criticality.

...

-MajorCriticality <SwitchParameter>
Specifies to return that the task history should only be returned for jobs only that are assigned a "major" criticality.

...

Returns today's task execution history for any all jobs with a job name that includes "sos".

...

Returns today's task execution history for any all jobs with dates being converted to the local timezone.

...

Returns today's task execution history for any all jobs with dates being converted to the GMT timezone.

...

Returns today's task execution history for any all jobs excluding the specified workflow paths and job names.

...

Returns the task execution history for any all failed jobs for the last seven days.

...

Returns the task execution history for any all jobs for the last seven days. The history is reported starting from midnight in the same timezone that is used with the -Timezone parameter.

...

Returns today's task execution history for any all completed tasks from the "/sos" folder and any sub-folders recursively.