OpenWGA 7.2 - TMLScript reference

WGA » WGA.Jobs
Method :

runTask(taskClass, options)

On object WGA.Jobs
Usage Runs a custom Java task as Job
Description

Takes the name of a custom Java task class implementing interface de.innovationgate.wgpublisher.scheduler.TaskImplementation, instantiates it and starts it as Job immediately.

The job created and run by this method will be transient, which means that it will be gone again after it has finished running. The job is given a generated job name which is returned by this method and can be used to monitor it.

The customOptions that can be passed optionally to the job will be available to the Job implementation object via method getOption() of the de.innovationgate.wgpublisher.scheduler.JobContext object.

Parameters

taskClass (Java class):

Class implementing de.innovationgate.wgpublisher.scheduler.TaskImplementation

options (Lookup table):

Options given to the task

Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events