Set up a workflow scheduling rule
Latest Dynatrace
Create a rule that's just right for your workflow using one of the rule types.
List existing scheduling rules
To list existing scheduling rules
-
Go to Workflows.
-
Select Settings > Rules.
From here, you can
- Create a rule
- Edit a rule
- Duplicate a rule
- Delete a rule
- View the version history of a rule
Edit an existing rule
To edit an existing scheduling rule
- Go to Workflows.
- Select Settings > Rules.
- Select the rule name.
- Follow the instructions below for the rule type.
As you edit your rule, keep an eye on the Scheduled days table displayed on the right. This table is updated as you change rule settings, so you'll know immediately if the rule is doing what you want it to do.
- Save your changes.
Create a rule
To create a scheduling rule
-
Go to Workflows.
-
Select Settings > Rules.
-
Select Rule.
-
Edit Untitled rule to a useful name for your new rule.
-
Select a Rule type.
TypeDescriptionRecurrenceThe rule will run repeatedly.GroupCombines multiple rules.Fixed offsetCalculate the schedule by taking the days of a rule and moving them by the number of days you set (x) with an offset of those days. The days you select (x) can also be a negative number, for example, -1, to move a day back.Conditional offsetShift days based on how two rules intersect. It takes every day from the first rule and finds the closest match of the second in the specified direction (previous or next). -
Follow the instructions below for the selected rule type.
As you edit your rule, keep an eye on the Scheduled days table displayed on the right. This table is updated as you change rule settings, so you'll know immediately if the rule is doing what you want it to do.
- Save your changes.
Recurrence rule
To define a scheduling rule based on Recurrence
- Set Rule type to Recurrence.
- Set Starts on to the date on which the rule takes effect.
- Set Repeats to the number of times to repeat the rule per day, week, month, or year.
- Set Every to the days of the week on which to run the rule.
- Set Business schedule.
- Workdays—to run the workflow on a working day in the week.
- Off days (weekend + holidays)—to run the workflow only on non-working days such as weekends and holidays.
- Holidays—to run the workflow only on holidays.
- Set Calendar to the calendar this rule will follow. If an appropriate calendar is not available, select Create a new calendar to create one.
- Select Save.
Advanced options
- Days of the month—This option restricts the rule to running the workflow on selected days each month. For example, you could run the workflow on the Second to last day of the month.
- Calendar weeks—Select the weeks the workflow should run. For example, if you select Second, the workflow will run only on the second week of the month.
- Months—Select multiple months when the workflow should run.
- Days of the year—Restrict the rule to run the workflow on certain days of the year.
Group rule
The group rule combines the days in three ways. The first one involves combining all the days. The second one intersects days between multiple rules, allowing only the days in all of the rules to be used. The third way is where the rule removes certain days.
To define a Group rule
- Set Rule type to Group.
- Choose the rule settings
- required Set On all days of (required) to one or more options from the menu. The workflow will run on the combination of your selection. For example, adding a rule for every Monday and another for every Tuesday will result in the workflow running every Monday and Tuesday.
- Set if also in if you need to intersect days in the rule. For example, a rule set up for every day in the first week of a month will run on Monday and Tuesday of the first week of every month, in combination with the above example.
- Set excluding to remove any days included in the above rules. For example, a first-of-the-month rule would remove any Monday or Tuesday of the first week of every month if it's the first of the month.
- Select Save.
Fixed offset rule
To define a Fixed offset rule
- Set Rule type to Fixed offset.
- required Choose the Rule.
- required Enter the number of days in with an offset of.
- Select Save.
Conditional offset rule
A conditional offset rule shifts days around based on how two rules intersect. It takes every day from the first rule to find the closest match to the second in the specified direction (previous or next). This type of rule can be used for events that commonly use an offset from a date, such as the first Monday after the 15th of every month. Another common use case would be where the offset is the exception, as in every second Thursday, but only if it is a working day; otherwise, it is on the next working day.
To define a Conditional offset rule
- Set Rule type to Conditional offset
- required Choose when the rule should run from On all days of. For every day, there is a rule: the workflow will run on those days. For example, if there is a rule for every Monday and Tuesday, the rule will run every Monday and Tuesday.
- required Choose if also to intersect with days in the rules. For example, a rule set up for every day in the first week of a month, in combination with the above example, will run on Monday and Tuesday of the first week of every month.
- Choose between previous and next days in Otherwise on the.
- Select Save.
Conditional offset example
Settings
- Set Rule type to Conditional offset.
- Select in On all dys of Every second Thursday.
- Set if also to Every working day.
- Select from Otherwise on the the next option.
You have two weekly scrum sprints, and your sprint starts every second Thursday, and you want to automate something on sprint change. You create a recurrence rule for every second Thursday. Now, there is an exception. If a Thursday is a public holiday, you wait until the next day; you start the sprint on Friday instead. Unless Friday is also a public holiday, you start on a Monday the week after. This rule says that if the sprint begins on a holiday day, do it on the next working day instead.