Schedule Groups are used in exMon to schedule automatic executions of objects.
This tutorial covers the following topics:
Creating Schedule Groups
To create a new Schedule Group:
- Right-click exMon > Schedule Groups
- Choose New > Schedule Group.
An empty Schedule Group has three main areas:
- Objects currently in the schedule
- Schedule Trigger
- Objects available for schedule.
Schedule Triggers
A schedule trigger is a rule that determines when the Schedule Group will execute. For example, it could execute every 5 minutes between 9 am and 17 pm, or it could execute on the first Sunday every month at 9 am.
When a schedule trigger executes, it executes all included objects at the same time on the environment (Development, Test, Production) defined in Execute on.
There are multiple ways of configuring schedule triggers. Here are some of the most common:
One Time Trigger
As the name suggests, the One Time trigger executes the Schedule Group once, at a predefined time in the future.
For example, in the case above, the Schedule Group would execute on the 15th of April 2015, at 9 pm.
Repeat Every Trigger
Repeat Every allows you to execute objects on an interval. For example, every 10 minutes during office hours or every hour during the night. The first trigger is calculated from the start date.
Daily Trigger
The daily trigger is probably our most commonly used trigger. With the daily trigger, you can configure the trigger to execute every day or weekday, at a predefined time.
In our example the trigger is configured to execute every weekday at 9 pm, starting on April 15th 2015. With the daily trigger, it is also possible to have, for example, execute every other day.
Weekly Trigger
With the Weekly trigger, you can choose which days in a week to execute. For example, if you need to execute on Monday, Wednesday and Friday every week.
Monthly Trigger
The monthly trigger allows you to choose which months are enabled, and choose between specific days in a month or days of a week.
For example, in our example above, we have (for some reason) chosen to execute on the 2nd and 7th of January and February at 9 pm.
In this example, we have chosen to execute on the first and third Monday of every month, at 9 pm, starting from April 15th.
Custom Trigger
Custom triggers are, without a doubt, our most complex triggers and can be used when the other triggers can't fulfil the requirements.
With the custom trigger, you create a custom SQL query which returns when the schedule should execute. This can, for example, be used by financial institutions to execute on all banking days. In that case, the query could filter out executions by comparing dates to a bank holiday table.
The help button provides detailed information about Custom triggers.
Adding objects to the schedule
Almost every type of object in exMon can be added to a Schedule Group, they include: Processes, Packages, Queries, Compare Queries, Reports, Dimensions and Object Groups.
To add objects to the schedule, find the desired object in the Object/Item browser and drag it to the schedule list, or double-click it.
You can add parameters to each object, that will be passed down when executing. In our example, we have added "--autocreateusers" to the Sales Without Price query to make it create users not found through user mapping. It is also popular to add "--email example@example.com" to notify about the results via email.
Note: All objects in Schedule Groups are executed at the same time which can put an unnecessary load on source systems.
If you have multiple objects that don't depend on starting exactly at that moment, it is good practice to add those objects to an Object Group and add that Object Group to the schedule. With the Object Group, you are able to control executions into steps.
Adding objects to schedule through the property grid
Objects can also be added to a Schedule Group in the properties pane within the object.
Here is an example of a properties pane from a Compare Query where it is possible to can choose between all available Schedule Groups.
Schedule Overview
An overview of Schedule Groups, with their last and next execution, can be found in the Schedule Groups folder in exMon.
Here we can see the current status of all Schedule Groups on the AdventureWorks system.