In this article:
1. The Scheduling Options in Recurring Business Rules
2. Working with the Advanced Schedule
2.1. Cron Generator
2.2. Custom Cron Expression
3. Working with the Predefined Interval
In Businessmap, you have many flexible scheduling options when configuring the execution of recurring business rules. Below, we will cover how to work with the advanced schedule and use custom cron expressions in the Recurring Create, Update, and Archive business rules.
1. The Scheduling Options in Recurring Business Rules
When configuring a recurring business rule, you need to set when it should be executed. To open the scheduling options, click on “Every day” (which is the default system configuration) in the WHEN panel. You have the following options:
- Advanced schedule — here you can set a custom schedule with a cron expression (check pt. 2).
- Every day — the rule will be executed every day in the hour you specify (from the Execute at field).
- Every month — the rule will be executed every month on the day you specify.
- Every week — the rule will be executed on the weekday you select.
- Every workday — the rule will be executed every workday (Mon - Fri).
- Predefined interval — here you can set a time interval for the execution of the rule, e.g. every 20 days (check pt. 3).
2. Working with the Advanced Schedule
When you select “Advanced schedule” and click on "Not set," you will open the advanced scheduling menu. It contains a standard cron generator (1) and a panel where you can build your custom cron expression (2).
2.1. Cron Generator
This menu offers more standardized scheduling options. Here you can select to execute the rule on a daily, weekly, monthly, and yearly basis. For example, you can set the trigger as every Monday:
When you save your choice, it will be displayed as a cron expression in the rule configuration:
2.2. Custom Cron Expression
For more complex scenarios, you can use the Custom Cron Expression tab to tailor your execution schedule. The custom cron expression menu includes all options from the cron generator as well as a range of other scheduling scenarios.
There are essentially three fields you can customize:
- Day of the month/Day of the week — you can either select a day of the month or a day of the week in your schedule. The unused field must contain a “?” symbol for the expression to be valid.
- Month — For example, “*” means the rule will trigger every month, while “1/2” means it will execute every two months, starting in January.
- Year — For example, “2024/2” means the rule will trigger every 2 years starting in 2024.
Clicking on either field will load a list of available values you can use with examples available on hover. As you adjust your expression, the text above it will change to explain what the expression will do in its current configuration.
For example, if you want to trigger a recurring rule on the last Friday at the end of each quarter, your expression can look like this:
Important: Some expression configurations may result in the rule not triggering repeatedly. For example, setting “10/3” for Month means your rule should trigger three months from October every year. Since a year only has 12 months, the rule will only execute once in October. Conversely, a configuration of “1/3” will trigger the rule every three months, starting in January.
3. Working with the Predefined Interval
The Predefined Interval menu adds another layer of scheduling customization. It basically lets you schedule rule execution at a certain time interval starting from a specified date.
For example, if you want to create a new card every 21 days starting from January 1st, your configuration will look like this:
With this configuration, the rule will execute on January 1st, 2025, then on January 22nd, February 12th, etc.
Note: When configuring a predefined interval, if the starting date is in the past, the system will automatically calculate the next execution date. For example, if today is August 5th and you configure a rule to execute every two days starting from August 4th, the first execution will occur on August 6th.