Tab "Job Definitions"
On this tab your define jobs for OpenWGA scheduler that are automatically added to the server configuration when an OpenWGA application using your design gets connected. If your design is used multiple times OpenWGA will create one individual job for each of your designs applications.
The jobs defined here have the following restrictions against those defined in administration:
- They only consist of one task
- This task must be of type "Java" or "TMLScript"
- On type "Java" the implementation class of the task may be provided by the JAR libraries of the design. The class must implement interface de.innovationgate.wgpublisher.scheduler.TaskImplementation. A job option of name "database" is provided to the running job, containing the database key of the app for which the job was registered.
- On type "TMLScript" there must be a TMLScript module in the current design that is run as job. The context of this script will be the database for which the job was registered.
- They are allowed exactly one predefined schedule which is to be specified as CRON schedule.
To add a job:
- Click button "add" to add a new entry to the definitions list
- In column "Name" enter a name for the Job. Only alphanumeric characters are allowed
- In column "Type" choose the Job to be a "Java" or "TMLScript" Job
- In column "Resource" give either the full qualified classname of your Java task implementation to run or the name of the TMLScript module. For TMLScript modules use the same name you would use in WebTML to reference them: No suffix, no path up to the code type folder, divide directories by ":". See here.
- In column "Description" give some description of the purpose of the task
- In column "CRON schedule" you may optionally specify a schedule by which your job is started automatically. Leaving this empty will let your job only run on manual start. Specify the schedule as a CRON expression with fields for seconds, minutes, hours, days of month, month and day of week (1-7 where 1 is sunday).