...
- JobScheduler is evolving towards an architecture that allows more flexible use with Agents.
- Find an overview of supported languages for jobs that make use of COM components.
Language Overview
Master | Agent | |||||||
---|---|---|---|---|---|---|---|---|
Language | Architecture | Language | Architecture | CommentComments | ||||
VBScript | JVM 64bit + Master 64bit
| ScriptControl:VBScript | No support for JVM 64bit + Agent |
| ||||
JVM 32bit + Master 32bit
| JVM 32bit + Agent 32bit
|
| ||||||
PowerShell | JVM 64bit + Agent 64bit
|
| ||||||
JVM 32bit + Agent 32bit
| ||||||||
dotnet (.NET) | same architectures as PowerShell |
|
...
- Examples are available for download from scripting.zip
- Unzip the archive in the
./config/live
folder of your JobScheduler Master, a sub-directoryscripting
will be created for job-related objects.
COM component for
...
example jobs
- From the attached archive scripting.zip register the COM component
ComComponent.dll
that implements a sample class. The .dll has been compiled using the AnyCPU model and has to be registered by the user. - Register the COM component for your respective architecture. The path to the .NET Framework might be different for your environment:
- 32bit
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe ComComponent.dll /codebase /tlb /nologo
- 64bit
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe ComComponent.dll /codebase /tlb /nologo
- 32bit
- To later on remove the registration use
regasm.exe ComComponent.dll /u
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<job title="Master runs VBScript that calls a COM component" order="no" stop_on_error="no" tasks="1"> <params/ > <script language="vbscript"> <![CDATA[ Set fso = CreateObject ("Scripting.FileSystemObject") Set stdout = fso.GetStandardStream (1) Set stderr = fso.GetStandardStream (2) dimDim objTest, intResult Set objTest = CreateObject ("ComComponent.ComClassExample") intResult = objTest.AddTheseUp (100, 200) stdout.WriteLine "running VBVBScript job: " & intResult ]]> </script> <run_time /> </job> |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<job title="Agent runs VBScript that calls a COM component" order="no" stop_on_error="no" tasks="1" process_class="Agent"> <params /> <script language="scriptcontrol:vbscript"> <![CDATA[ Set fso = CreateObject ("Scripting.FileSystemObject") Set stdout = fso.GetStandardStream (1) Set stderr = fso.GetStandardStream (2) dimDim objTest, intResult Set objTest = CreateObject ("ComComponent.ComClassExample") intResult = objTest.AddTheseUp (100, 200) stdout.WriteLine "running VBVBScript job: " & intResult ]]> </script> <run_time /> </job> |
...
- This example works for Agents with a JVM 32bit and 64bit (depending on the JVM architecture in use).
- The above COM component
ComComponent.dll
has to be registered for the respective architecture. - For details on the use of the JobScheduler API see PowerShell Jobs.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<job title="Agent runs PowerShell that calls a COM component" order="no" stop_on_error="no" tasks="1" process_class="Agent"> <params /> <script language="powershell"> <![CDATA[ $objTest = New-Object -ComObject "ComComponent.ComClassExample" $intResult = $objTest.AddTheseUp(100, 200) echo "running PowerShell job: $intResult" ]]> </script> <run_time /> </job> |
...