...
Code Block | ||||
---|---|---|---|---|
| ||||
1..10 | Add-OrderJobSchedulerOrder -JobChain /some_folder/some_job_chain |
...
- Adds 10 temporary ad hoc orders to the specified job chain, see
Add-OrderJobSchedulerOrder
. - The order identification is not specified but is generated by the JobScheduler Master.
- All orders are submitted to the JobScheduler Master in a single transaction at the end of the bulk operation.
...
Code Block | ||||
---|---|---|---|---|
| ||||
$orders = ( 1..10 | Add-OrderJobSchedulerOrder -JobChain /some_folder/some_job_chain -Immediate ) $orders | Remove-OrderJobSchedulerOrder |
Explanations
- Line 1 adds 10 temporary ad hoc orders.
- Consider use of the switch
-Immediate
to submit each order individually to the JobScheduler Master and to receive the newly created order identification immediately. - The result of the
Add-OrderJobSchedulerOrder
cmdlet is assigned to a variable for later use.
- Consider use of the switch
- Line 2 pipes the recently created orders to the
Remove-OrderJobSchedulerOrder
cmdlet.
Identify temporary orders
...
Code Block | ||||
---|---|---|---|---|
| ||||
$orders = Get-OrderJobSchedulerOrder -NoPermanent $orders.count |
...
- 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-OrderJobSchedulerOrder
cmdlet is assigned to a variable for later use.
- Consider use of additional parameters such as
- Line 2 displays the number of orders that meet the conditions.
...
Code Block | ||||
---|---|---|---|---|
| ||||
Get-OrderJobSchedulerOrder -NoPermanent | Suspend-OrderJobSchedulerOrder |
Explanations
- In a pipelined operation temporary orders are retrieved and suspended, see
Suspend-OrderJobSchedulerOrder
. - Consider use of additional parameters such as
-Directory
and-JobChain
to further restrict the number of orders.
...
Code Block | ||||
---|---|---|---|---|
| ||||
$orders = Get-OrderJobSchedulerOrder -NoPermanent $orders.count $orders $orders | Suspend-OrderJobSchedulerOrder |
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-OrderJobSchedulerOrder
cmdlet is assigned to a variable for later use.
- Consider use of additional parameters such as
- 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-OrderJobSchedulerOrder
cmdlet,
Remove temporary orders
...
Code Block | ||||
---|---|---|---|---|
| ||||
Get-OrderJobSchedulerOrder -NoPermanent | Remove-OrderJobSchedulerOrder |
Explanations
- In a pipelined operation temporary orders are retrieved and removed, see
Remove-OrderJobSchedulerOrder
. - 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-TaskJobSchedulerTask
cmdlet to kill running tasks.
...