Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Creating a task (With examples)

To create a task for your Wavelet EMP system, the user will need to perform the below procedures:

  1. Goto PLUGIN > (TASK SCHEDULER) CREATE TASK
  2. Specify accordingly, with reference to the task, the "Group", "Name" and "Description" of the task
    1. Example:
    2. Group : Billing
    3. Name : Outstanding Invoice
    4. Description : Email notification when there is any outstanding invoice.
  3. Select the required job to be executed from the drop-down list under "Job". **Note that only uploaded job/ task will be shown
    1. Example: Select : plugin-wavelet-tasksched-invOutstandingDue
  4. Key in the path for the selected job/ task in the "Main Job Class" 
    1. To identify the path for the selected job/ task, extract the initially saved file/s using programs such as winrar . 2 files should be extracted out, namely "META-INF" and "Taskscheduler" 
    2. Copy and paste the entire path from "Taskscheduler" into the "Main Job Class".
      1. For example, if the user have downloaded the job/ task of plugin-wavelet-tasksched-invOutstandingDue.jar,
      2. The user should be able to drill down from Taskscheduler > Notification > Invoice_due > src > InvOutstandingDueNotification.class
      3. The path should appear as taskscheduler\notification\invoice_due\src\InvOutstandingDueNotification.class
    3. After performing the copy and paste, replace the "\" with "." and remove the ".class" 
      1. From the above example, the path that should appear in this job/ task under the "Main Job Class" should be as below:
      2. taskscheduler.notification.invoice_due.src.InvOutstandingDueNotification
  5. Specify accordingly, with reference to the task, the "Group" and "Name" under "Trigger" 
    1. Example:
    2. Trigger Group : Email notification
    3. Trigger Name : Invoice triggered
    4. Cron Script Trigger : Refer to the table below:
    5. Example for Cron Script Trigger:

      CronTrigger Example 1 - an expression to create a trigger that simply fires every 5 minutes

      "0 0/5 * * * ?"

      CronTrigger Example 2 - an expression to create a trigger that fires every 5 minutes, at 10 seconds after the minute (i.e. 10:00:10 am, 10:05:10 am, etc.).

      "10 0/5 * * * ?"

      CronTrigger Example 3 - an expression to create a trigger that fires at 10:30, 11:30, 12:30, and 13:30, on every Wednesday and Friday.

      "0 30 10-13 ? * WED,FRI"

      CronTrigger Example 4 - an expression to create a trigger that fires every half hour between the hours of 8 am and 10 am on the 5th and 20th of every month. Note that the trigger will NOT fire at 10:00 am, just at 8:00, 8:30, 9:00 and 9:30
      "0 0/30 8-9 5,20 * ?"

  6. Click "Create task" to confirm the settings and create the task
  7. Load the created task into the scheduler by clicking "(Re)Load Task to scheduler now"
  • No labels