Scripting Jobs: Difference between revisions

From Obsidian Scheduler
Jump to navigationJump to search
No edit summary
No edit summary
Line 5: Line 5:
* com.carfey.ops.job.script.GroovyJob [http://groovy.codehaus.org Groovy]
* com.carfey.ops.job.script.GroovyJob [http://groovy.codehaus.org Groovy]
* com.carfey.ops.job.script.BeanShellJob executing a [http://www.beanshell.org/ BeanShell] script.
* com.carfey.ops.job.script.BeanShellJob executing a [http://www.beanshell.org/ BeanShell] script.
* com.carfey.ops.job.script.SpringBeanJob is a convenience GroovyJob that does not require a script, using defined parameters to obtain the bean and invoke the method(s).
* com.carfey.ops.job.script.ReflectiveJob is a convenience GroovyJob that does not require a script, using defined parameters to construct an object and invoke method(s), both supporting argument(s).


= Parameters =
= Parameters =
Any parameters configured for the job will be set as global-variables within the script. If a single value is configured for a parameter, it will be set as its direct type. If multiple values are set for a parameter, it will be passed into the script as a list of values.
Any parameters configured for the job will be set as global-variables within the script. If a single value is configured for a parameter, it will be set as its direct type. If multiple values are set for a parameter, it will be passed into the script as a list of values.

Revision as of 03:25, 7 June 2011

Obsidian provides support for execution of scripted jobs. None of these require any java code to be written. Scripts are set using the web admin application Jobs config.

  • com.carfey.ops.job.script.JavaScriptJob running Rhino
  • com.carfey.ops.job.script.PythonJob running Jython
  • com.carfey.ops.job.script.GroovyJob Groovy
  • com.carfey.ops.job.script.BeanShellJob executing a BeanShell script.
  • com.carfey.ops.job.script.SpringBeanJob is a convenience GroovyJob that does not require a script, using defined parameters to obtain the bean and invoke the method(s).
  • com.carfey.ops.job.script.ReflectiveJob is a convenience GroovyJob that does not require a script, using defined parameters to construct an object and invoke method(s), both supporting argument(s).

Parameters

Any parameters configured for the job will be set as global-variables within the script. If a single value is configured for a parameter, it will be set as its direct type. If multiple values are set for a parameter, it will be passed into the script as a list of values.