Trigger Recipes

Trigger On The First Monday Of The Month

  1. Before creating a trigger, user will need to have an existing job that is working perfectly.
  2. When a working job is available, create a trigger in Administration Tools > Scheduler by clicking Add. The Trigger Wizard window opens.
  3. In the Trigger Wizard, enter the user name and a unique name for the trigger. Select the job to be run as seen in Figure 5.4, “Trigger Wizard”. If the job requires parameters to be entered, it will be done in this page of the wizard.

    Figure 5.4. Trigger Wizard

    Trigger Wizard
  4. The next page of the Trigger Wizard is used to configure the schedule of the trigger, setting the time and frequency the trigger will run, like in Figure 5.5, “Job Schedule”. To run the trigger on every Monday of the month, select monthly from the drop down list. For Job fire time:, enter the time the trigger should run on every Monday of the month. For Months, enter * to imply all months. Else, click on Select and select the months respectively. Then, select the second radio button and select First for the first drop down list and Mon for the second drop down list.

    Figure 5.5. Job Schedule

    Job Schedule
  5. The following page of the wizard allows the user to configure the active period of the trigger. If the trigger needs to run forever, select the checkboxes at Now and Never at . Else, select configure the starting and ending time respectively.
  6. The Time Zone page is for users to explicitly specify the time zone where they want the job to be fired, which will be used when interpreting this trigger.
  7. The Trigger Calendar page is for users to load the calendar file, explicitly excluding particular dates. However, this is not compulsory. Users can continue without defining a calendar file.
  8. Misfire Configuration page is on the next page. This enables the user to override the default job timeouts and makes the trigger know what to do when a misfire occurs.
  9. Last but not least, the Security page which is exactly the same for all elements in the Designer.
  10. Clicking on Finish will complete the creation process.
  11. This trigger will now run at 8a.m. on every first Monday of each month, never ending.

Trigger On The Last Friday Of The Month

This trigger is very similar to the one in the section called “Trigger On The First Monday Of The Month”.

  1. Follow the instructions from step 1 to step 3 in the section called “Trigger On The First Monday Of The Month”.
  2. In step 4 of the section called “Trigger On The First Monday Of The Month”, the configurations are done for every first Monday of the day. For now, it needs to be changed to every last Friday of the month. Simply, change First to Last and Mon to Fri in the dropdown list respectively, like in Figure 5.6, “Every Last Friday Of The Month”.

    Figure 5.6. Every Last Friday Of The Month

    Every Last Friday Of The Month
  3. The rest of the steps will be similar to the ones mentioned in the section called “Trigger On The First Monday Of The Month”, from step 5 onwards.
  4. This trigger will now run at 8a.m. on every last Friday of the month, forever.

Trigger On The Last Working Day Of The Month

In this example, it is assumed that there are 5 working days in a week, which implies Monday to Friday.

  1. Follow the instructions from step 1 to step 3 in the section called “Trigger On The First Monday Of The Month”.
  2. In order to configure the trigger to run on every last working day of the month, change the settings to according to Figure 5.7, “Every Last Working Day Of The Month”.

    Figure 5.7. Every Last Working Day Of The Month

    Every Last Working Day Of The Month
  3. Follow step 5 to 9 mentioned in the section called “Trigger On The First Monday Of The Month”.
  4. When created successfully, the trigger will run on every last working day of the month forever. If user decides not to run this trigger forever, it can be configured in the Trigger wizard.

Trigger On The Last Working Day Of The Quarter

  1. Follow the instructions from step 1 to step 3 in the section called “Trigger On The First Monday Of The Month”.
  2. In order to configure the trigger to run on the last working day of each quarter, change the settings as shown in Figure 5.8, “Every Last Working Day Of The Quarter”.

    Figure 5.8. Every Last Working Day Of The Quarter

    Every Last Working Day Of The Quarter
  3. Follow step 5 to 9 mentioned in the section called “Trigger On The First Monday Of The Month”.
  4. When the configurations are done correctly and saved, this trigger will run on every last working day of each quarter.