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

Compare with Current View Page History

Version 1 Next »

Starting Situation

  • Orders can be configured as permanent objects with the JobScheduler Master. Such orders are stored in XML files on disk.
  • Orders can be configured as temporary orders, i.e. ad hoc orders, that are used to execute a job chain just once.
    • Temporary orders are not stored in files on disk. 
    • The state of temporary orders is maintained with the JobScheduler database for restart capability.
  • Typically temporary orders are created by jobs or scripts, e.g. creating some 10'000 orders from records in a database table.
  • Should such jobs or scripts misbehave and hammer the JobScheduler Master with unwanted temporary orders then such orders can be managed by the CLI.

Use Cases

Identify temporary orders

Before acting on temporary orders it is recommended to identify the order objects like this:

$orders = Get-Order -NoPermanent
$orders.count

Explanations

  • Line 1 retrieves exclusively temporary ad hoc orders by use of the -NoPermanent switch.
    • Consider use of additional parameters such as -Directory and -JobChain to further restrict the number of orders.
    • The result of the Get-Order cmdlet is assigned to a variable for later use.
  • Line 2 displays the number of orders that meet the conditions.

Suspend temporary orders

Suspending temporary orders allows keep such orders for further investigation. Suspended orders are not carried out by the JobScheduler Master:

Get-Order -NoPermanent | Suspend-Order

Explanations

  • In a pipelined operation temporary orders are retrieved and suspended.
  • Consider use of additional parameters such as -Directory and -JobChain to further restrict the number of orders.

 

$orders = Get-Order -NoPermanent
$orders.count
$orders
$orders | Suspend-Order

Explanations

  • Line 1 retrieves exclusively temporary ad hoc orders by use of the -NoPermanent switch.
    • Consider use of additional parameters such as -Directory and -JobChain to further restrict the number of orders.
    • The result of the Get-Order cmdlet is assigned to a variable for later use.
  • Line 2 displays the number of orders that meet the conditions.
  • Line 3 displays the $order variable, i.e. the list of orders.
  • Line 4 pipes the list of orders to the Suspend-Order cmdlet,

Remove temporary orders

Removing temporary orders prevents JobScheduler from executing further job nodes of a job chain for that order.:

Get-Order -NoPermanent | Remove-Order

Explanations

  • In a pipelined operation temporary orders are retrieved and removed.
  • Consider use of additional parameters such as -Directory and -JobChain to further restrict the number of orders.
  • Tasks that are currently running for an order are not affected by this operation. Such tasks will continue until completion. Consider use of the Stop-Task cmdlet to kill running tasks.

 

  • No labels