Scripting languages from the Windows Shell
- You can use any scripting language by using the
<job language="shell">
attribute and by calling the respective script interpreter.- For example for Windows the VBScript interpreter is
cscript.exe
which would make your job look like this: <job stop_on_error="no">
<script language="shell">
<![CDATA[
cscript.exe %SCHEDULER_JOB_CONFIGURATION_DIRECTORY%\test.vbs
]]>
</script>
<run_time />
</job>
- This job can be executed with the JobScheduler Master and with Agents
- For example for Windows the VBScript interpreter is
- The same applies to JScript and other languages including languages supported by the Windows Script Engine (Windows Scripting Host).
Scripting Languages with JobScheduler API Support
- You can use VBScript and make use of the JobScheduler API in your scripts. The API provides objects and methods to control jobs, start other jobs or orders etc.
- Such jobs can only be executed with the JobScheduler Master and would look like this:
<job stop_on_error="no">
<script language="vbscript">
<![CDATA[
Function spooler_process()
spooler_log.info( "running VBscript job" )
spooler_process = false
End Function
]]>
</script>
<run_time />
</job>
- This job can be executed with the JobScheduler Master only, it is not supported for use with JobScheduler Agents.
Further Scripting Languages
- JobScheduler supports a number of scripting languages that are provided by the Java Virtual Machine
- See What Java scripting languages are supported?