Setting Up Jobs for Scheduled Execution

Top  Previous  Next

The QTask module allows scheduling and running any kind of Scripts or Jobs externally to QueWeb (in a separate process) while monitoring their execution, passing variables to them and logging the results in the application. A Script can be defined as the Java-based business action by the following information: script short name, description and parameters. Some default Scripts are installed during the QueWeb installation procedure.

Scripts Form defines the Scripts available in the system. Each installed script has the following properties:

Name - short name of the Script
Description - Description of the Script, typically describes the Scripts action
Class - Java class name implementing the business action the Script is based on
Creator - creator of the Script, populated automatically
Modified - Last modified date, populated automatically

Tasks Form defines the schedule for running the Scripts. Each Task has the following properties:

Name - short name of the Task
Script reference to Script the Task is based on
Status - status of the Task. This field is read only and is automatically updated upon events. See below the definition of various Task statuses
First Start - the first scheduled time/date to start the Script
Next Start - if the Task is repeatable, the time/date of the next Script start. Is automatically populated by the system.
Repeat - check this box if you want the Task to be repeatable
Auto start - auto start the Script on application startup (once the scheduler is started)
Delay - the delay between the Task executions if the Task is repeatable
Unit - units of the delay value, can be Minutes, Hours, Days or Months
Creator - the creator of the Task, populated automatically
Created -date when the Task was created.

After the Task is created its Status becomes New. In order to schedule the task for execution you need to click Start Script button. After that Status changes to Ready. Another way to schedule a new Task for execution is to mark it as Auto Start; after the next application restart Task will automatically be scheduled for execution. Task changes its Status to Running when the script is executing. Status Waiting indicates that the Task is repeatable and the Script was executed at least ones and is scheduled for the execution again. Completed when the task was stopped (User clicked Stop Task button) during the Waiting phase or it is not a repeatable Task and was successfully executed once. Status changes to Interrupted when the Script was stopped during execution or when some internal application error occurred and Task execution cannot continue.