Info |
---|
|
- This article is deprecated and applies to JobScheduler releases up to 1.9
- Starting from JobScheduler Release 1.10.5 native support for PowerShell is available
- For detailed information see PowerShell Jobs
Display feature availability |
---|
StartingFromRelease | 1.10.5 |
---|
|
|
Table of Contents |
---|
| outlinh1. true |
---|
| outlinh1. true |
---|
1 | printablefalse |
---|
2 | stylh1. none |
---|
3 | indent20px |
---|
|
PowerShell as a job
Acessing Accessing parameters, comming coming from an order or a job, by environment variables makes it easy to use a generic job for executing powershell PowerShell scripts. the The order - (parameters or job -) parameters has have to specifiy specify the name of the script and some more parameters , which that will be accessed then by the powershell passed to the PowerShell script.
Code Block |
---|
|
<job
<[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/job.xml job ]title="Execute a PowerShell Script" order="yes" stop_on_error="no">
<[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script ]<script language="shell">
<![CDATA[<i><b>
powershell -nologo -NonInteractive -noprofile -file "%SCHEDULER_PARAM_SCRIPT_FILENAME%"
exit %errorlevel%
</b></i> ]]>
</script>
<[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/monitor.xml monitor ]<monitor name="configuration_monitor" ordering="0">
<[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script ]<script java_class="sos.scheduler.managed.configuration.ConfigurationOrderMonitor" language="java"/>
</monitor>
<[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/run_time.xml run_time]<run_time/>
</job>
|
The <monitor>
used in this example is needed required for parameter substitution of the order - parameters.related downloads:
Related Downloads
...
See also
...