Versions Compared

Key

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

...

Example: Powershell as a Shell

tbdA simple job with some scripting analogue to basic Shell jobs might look like this:

Code Block
collapsetrue
Example Shell: 
myscript.cmd %SCHEDULER_PARAM_NAME1%

Example Powershell: 
myscript.cmd $env:SCHEDULER_PARAM_NAME1<?xml version="1.0" encoding="ISO-8859-1"?>
<job  process_class="/tests/Agent">
    <script  language="powershell">
echo "job is starting"
sleep 10
$files = dir *
echo $files
echo job is finishing
    </script>
    <run_time />
</job>

 

Example: Powershell API Jobs

tbd

Code Block
collapsetrue
  <job process_class="my_process_class">
 <script language="powershell">
 <![CDATA[
Import-Module JobScheduler
use-master myjobscheduler:4444
get-status

 ]]>
 </script>
<run_time />

Example: Combination of both (Job with Monitors) 

...

Extras: CLI for Powershell Jobs

Code Block
Info
collapsetrue
 <job 
<job
process_class="my_process_class">


 <script language="powershell">


 <![CDATA[

Import-Module JobScheduler


use-master myjobscheduler:4444


get-status


 ]]>


 </script>

<run_time />
Info

</job>