You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

NAME

Add-JobSchedulerEvent

SYNOPSIS

Adds an event to a JobScheduler instance.

SYNTAX

Add-JobSchedulerEvent [-EventClass <String>] -EventId <String> [-ExitCode <Int32>] [-AllowedExitCode <Int32>] [-Job <String>] [-JobChain <String>] [-Order <String>]
[-MasterUrl <Uri>] [-SupervisorUrl <Uri>] [-SupervisorJobChain <String>] [-ExpirationDate <DateTime>] [-ExpirationCycle <String>] [-ExpirationPeriod <String>] [-NoExpi
ration] [-Parameters <Hashtable>] <CommonParameters>

DESCRIPTION

JobScheduler Master supports a number of XML commands.
This cmdlet accepts XML commands and forward them to the JobScheduler Master.

PARAMETERS

EventClass

-EventClass <String>
Specifies a common name for a set of events that enabling event handlers to process multiple events of the
same class. For example, "daily_closing" could be an event class for jobs that should start once day-time
business processes have drawn to a close.

Species a unique identifier when used together with the -EventId parameter. Can, for example, be used to remove
events (remove all events of a particular class).

Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

EventId

-EventId <String>
An identifier for an event. Allows event handlers to react to events having a particular ID.

Specifies a unique identifier when used together with the -EventClass parameter. An event id is required to be unique
for the same event class.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

ExitCode

-ExitCode <Int32>
The current exit code of the job script running. Assign $lastexitcode as a value
to specify the last non-zero exit code of a PowerShell script or command.

Default: the script exit code.

Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

AllowedExitCode

-AllowedExitCode <Int32>
Specifies a list of exit codes that signal that a job is considered as having run successfully.
This is useful if job scripts provide return values in the form of exit codes and these codes
should not be considered as errors.

Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

Job

-Job <String>
Specifies the name of the job currently running.

Default: the current job name

Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

JobChain

-JobChain <String>
Specifies name of the current job chain

Default: the current job chain

Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

Order

-Order <String>
Specifies the identifier of the current order.

Default: the current order identification (order id)

Required? false
Position? 7
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

MasterUrl

-MasterUrl <Uri>
Specifies the Job Scheduler Master instance URL.

The URL consists of the protocol, host name and port, e.g. http://localhost:4454.

Default: If used with a job then the CLI will assign by default the JobScheduler Master that the job is running for

Required? false
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

SupervisorUrl

-SupervisorUrl <Uri>
Specifies a Job Scheduler Supervisor instance URL.

Job Scheduler Master instances register with a JobScheduler Supervisor (if configured to do so)
in order to synchronize job configurations. The Supervisor instance receives events, executes the
event handler and starts jobs and job chains for registered JobScheduler Master instances.

The URL consists of the protocol, host name and port, e.g. http://localhost:4454.

Default: If used with a job then the CLI will assign by default the JobScheduler Supervisor that the
current JobScheduler Master is registered for.

Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

SupervisorJobChain

-SupervisorJobChain <String>
Specifies the path of the job chain in the JobScheduler Supervisor instance that implements the event
processor.

Default: /sos/events/scheduler_event_service

Required? false
Position? 10
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

ExpirationDate

-ExpirationDate <DateTime>
Specifies the point in time for which an event automatically expires: this parameter is considered by the
Event Processor. A specific point in time can be specified by use of the ISO date format, i.e. yyyy-MM-dd hh:mm:ss.
The value 'never' ensures that the event does not ever expire.

The parameters -ExpirationDate, -ExpirationCycle, -ExpirationPeriod, -NoExpiration may not be used at the same time.

Default: 00:00 on the following day.

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

ExpirationCycle

-ExpirationCycle <String>
Specifies the duration after which the event will expire in the current period.
Periods start at 00:00 and end at 24:00. An expiration period of 04:00
specifies that the event will expire 4 hours starting from the current point in time.

Values are specified by use of the format hh:mm:ss.

The parameters -ExpirationDate, -ExpirationCycle, -ExpirationPeriod, -NoExpiration may not be used at the same time.

Required? false
Position? 12
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

ExpirationPeriod

-ExpirationPeriod <String>
Specifies the time for which the event will expire in the current period.
Periods start at 00:00 and end at 24:00. An expiration period of 21:00
specifies 9pm of the current period for event expiration.

Values are specified by use of the format hh:mm:ss.

The parameters -ExpirationDate, -ExpirationCycle, -ExpirationPeriod, -NoExpiration may not be used at the same time.

Required? false
Position? 13
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

NoExpiration

-NoExpiration <SwitchParameter>
Specifies that an event will not expire.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

Parameters

-Parameters <Hashtable>
Allows additional parameters for event handlers to be specified. Parameters are created using name-value
pairs from a hashmap as e.g. 'name1'='value1'; 'name2'='value2'.

Parameter names can be freely chosen and event handlers configured to
take account of values handed over. Any number of parameters can be added.

Required? false
Position? 14
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters?

about_jobscheduler

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

C:\PS>Add-Event -ExitCode $lastexitcode -EventClass daily_closing -EventId 12345678

Creates an event from the latest exit code, event class and event id.

-------------------------- EXAMPLE 2 --------------------------

C:\PS>Add-Event -EventClass daily_closing -EventId 12345678

Creates an event with the specified event class and event id.

  • No labels