You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Scope

  • JobScheduler supports VBScript for implementation of jobs:
    • support for VBScript with a Master is available since long
    • support for VBScript with Agents is available with  JS-1623 - Getting issue details... STATUS
  • The support for VBScript includes Shell jobs and API jobs:.
  • Some minor differences exist between VBScript jobs for Master and Agents, see Compatibility between PowerShell and Shell.
  • VBScript jobs are configured with
    • <script language="VBScript"> for execution with a Master
    • <script language="ScriptControl:VBScript"> for execution with Agents.

Background

  • VBScript is a scripting language that is not developed any further.by Microsoft.
  • The language is restricted to use of 32bit architectures:
    • In 64Bit environments VBScript can be executed from the command line by WoW64.
    • JobScheduler in a 64Bit environment can execute VBScript scripts.
    • However, VBScript is restricted to use of the 32Bit registry and can load classes that are registered for a 32Bit environment exlusively.
  • In future releases JobScheduler Master will become available for 64Bit environments only. JobScheduler Agents can be executed with 32Bit environments and 64Bit environments, the architecture in use is determined by the Java Virtual Machine (JVM) in use.
    • Agents that are running with a JVM 32Bit (which is feasible within a 64Bit server architecture) integrate VBScript via the ScriptControl.
    • ScriptControl is available for 32Bit only.
  • The intoduction of VBScript support for Agents offers a migration path for users of VBScript jobs:
    • Jobs can be migrated from execution of a Master to execution by Agents. 
    • Migration requires
      • to use the <script language="ScriptControl:VBScript"> attribute for jobs.
      • to assign a process class to jobs or job chains that is assigned an Agent running with a 32Bit JVM.
      • to adjust the VBScript syntax when using properties of the JobScheduler API.

Feature Availability

FEATURE AVAILABILITY STARTING FROM RELEASE 1.10.5

Examples

Example: VBScript Job

Example 1: A simple VBScript job with some scripting similar to shell jobs might look like this:

x<?xml version="1.0" encoding="ISO-8859-1"?>
<job process_class="my_Agent">
<script language="powershell">
 <![CDATA[
echo "job is starting"
# pause the job for 10 seconds
Start-Sleep -Seconds 10
# list files in a directory
$files = dir *
echo $files
 
# execute some Windows command script
/tmp/some_batch_script.cmd
echo "job is finishing"
 ]]>
 </script>
 <run_time />
</job>x
  • No labels