Versions Compared

Key

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

Is it possible to use Ruby as a

...

scripting language for the JobScheduler?

  • JRuby should be possible. We use the the Javax scripting framework to allow implementation of

...

  • Third Party scripting engines.

...

Calling Ruby in a job script

The language identification would be javax.script:jruby like this:

Code Block
languagexml
<?xml version="1.0" encoding="ISO-8859-1"?>
<job  title="sample job">
    <params />
 
    <script  language="javax.script:jruby"

...

> <![CDATA[
		// put you Ruby code here
    ]]></script>
 
    <run_time />
</job>

Calling the Ruby scripting engine programmatically

code
Code Block
languagebash
 ScriptEngine jruby = new ScriptEngineManager().getEngineByName("jruby");