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.
- Read more about this in our JobScheduler and Script Languages document.
- You will find further information in the jruby web site and
- Ruby examples: here
Calling Ruby in a job script
The language identification would be javax.script:jruby
like this:
<?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
ScriptEngine jruby = new ScriptEngineManager().getEngineByName("jruby");