Versions Compared

Key

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

...

  • JobScheduler branch 1.x (JS1) supports scripting languages to which the JobScheduler Job API is exposed.
  • The scripting languages JScript and VBScript are supported by the JVM on Windows 32bit systems only as they have never been ported for use with a 64bit JVMarchitecture, see see VBScript Jobs. The ScriptControl:VBScript job type introduced with JobScheduler release 1.10 acts as a replacement for VBScript jobs.

...

Code Block
languagexml
titleExample for job to execute executing VBScript with "vbscript" job type
<job>
  <script language="VBScript"><![CDATA[
function spooler_process()
  
  spooler_log.info( "hello world" )
  spooler_process = false
  
end function
]]></script>
  <run_time/>
</job>

...

Code Block
languagexml
titleExample for job to execute executing VBScript with "scriptcontrol:vbscript" job type
<job process_class="/agent_windows">
  <script language="scriptcontrol:vbscript"><![CDATA[
function spooler_process()
  
  spooler_log.info( "hello world" )
  spooler_process = false
  
end function
]]></script>
  <run_time/>
</job>

...

Code Block
languagepowershell
titleExample for command to execute executing VBScript in 64bit mode
cscript.exe //NoLogo C:\tmp\test.wsf

...

Code Block
languagepowershell
titleExample for command to execute executing VBScript in 32bit mode
%WINDIR%\SysWOW64\cmd.exe /k cscript.exe //NoLogo C:\tmp\test.wsf

...

Windows Script File

A Windows Script File (.wsf) is an XML file that includes references to files holding VBScript code (.vbs) holding VBScript code:

Code Block
languagepowershell
titleExample for a Windows Script File
<?xml version="1.0" ?>
<job id="none">
  <script language="VBScript" src="c:\tmp\JS7_SpoolerClasses.vbs"/>
  <script language="VBScript" src="c:\tmp\test_01_include1.vbs"/>
  <script language="VBScript" src="c:\tmp\test_01_include2.vbs"/>
  <script language="VBScript" src="c:\tmp\test_01.vbs"/>
</job>

...