Skip to content

Commit cf2f784

Browse files
authored
Merge pull request #9090 from mendix/qt-peerreview
Peer review: Scheduled Events
2 parents d27460b + da40068 commit cf2f784

2 files changed

Lines changed: 93 additions & 96 deletions

File tree

content/en/docs/refguide/modeling/resources/scheduled-events.md

Lines changed: 54 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,90 +8,90 @@ description: "Options for configuring scheduled events"
88

99
## Introduction
1010

11-
With scheduled events you can make the runtime execute a microflow repeatedly at specific intervals. The microflow is run using the [task queue](/refguide/task-queue/) mechanism.
11+
Sometimes you will want to regularly run a microflow which does not require end-user interaction. You can do this using scheduled events. Scheduled events are managed using the [task queue](/refguide/task-queue/) mechanism.
1212

1313
A scheduled event is added to your module as a document (right-click your module and you will find it listed under *Add other*).
1414

1515
{{% alert color="warning" %}}
16-
Scheduled events can be tested locally, but they will not be run if your app is deployed as a Free App. See the Free App section of [Mendix Cloud](/developerportal/deploy/mendix-cloud-deploy/#free-app) for more information on Free App limitations.
16+
Scheduled events can be tested locally, but they will not be run if your app is deployed as a Free App. For more information on Free App limitations, see the [Free App](/developerportal/deploy/mendix-cloud-deploy/#free-app) section of *Mendix Cloud*.
1717
{{% /alert %}}
1818

1919
## Common Properties
2020

2121
| Property | Description |
2222
| --- | --- |
23-
| Name | The name of the scheduled event. This name is recorded in the `System.ProcessedQueueTask` objects at runtime, so that you can identify when this scheduled event has been processed. See [Task Queues](/refguide/task-queue/) for additional information about this object. ⚠ For compatibility with legacy scheduled events, it is also stored in the `ScheduledEventInformation` objects but this is deprecated and will be removed in Mendix 11. |
24-
| Documentation | This field is for documentation purposes in the app model only. Its value is not visible to end-users and doesn't influence the behavior of your application. |
23+
| Name | The name of the scheduled event. This name is recorded in the `System.ProcessedQueueTask` objects at runtime so you can identify when this scheduled event has been processed. See [Task Queues](/refguide/task-queue/) for additional information about this object.<br/>⚠ For compatibility with legacy scheduled events, it is also stored in the `ScheduledEventInformation` objects but this is deprecated and will be removed in Mendix 11. |
24+
| Documentation | This field is for documentation purposes in the app model only. Its value is not visible to end-users and does not influence the behavior of your application. |
2525

2626
## Execution Properties
2727

2828
| Property | Description |
2929
| --- | --- |
30-
| Microflow | The microflow that is executed when the scheduled event is executed. It should have no parameters and is run with all rights (see [Microflow](/refguide/microflow/)). |
31-
| Enabled | The microflow is only executed if the scheduled event is enabled. This setting only applies when running from Studio Pro or from Eclipse. On production environments, scheduled events are enabled/disabled via the platform tools (for example the Mendix Portal or Windows Service Console). |
30+
| Microflow | The microflow that is initiated when the scheduled event is run. It should have no parameters and is run with all rights (see [Microflow](/refguide/microflow/)). |
31+
| Enabled | The microflow is only initiated if the scheduled event is enabled. This setting only applies when running from Studio Pro or from Eclipse. On production environments, scheduled events are enabled/disabled via the platform tools (for example, the Mendix Portal or Windows Service Console). |
3232

3333
## Timing Properties
3434

3535
| Property | Description |
3636
| --- | --- |
37-
| Interval type | The type of scheduled that should be executed. Valid values are [Yearly](#yearly), [Monthly](#monthly), [Weekly](#weekly), [Daily](#daily), [Hourly](#hourly) or [Minutes](#minutes). |
37+
| Interval type | The type of schedule that should be implemented. Valid values are [Yearly](#yearly), [Monthly](#monthly), [Weekly](#weekly), [Daily](#daily), [Hourly](#hourly), or [Minutes](#minutes). |
3838

3939
### Yearly Properties {#yearly}
4040

41-
Yearly events come in 2 flavors:
41+
You can specify how a yearly scheduled event is run in two different ways by specifying the **Input type**:
4242

43-
* Execute on a specific date
44-
* Execute on a specific weekday
43+
* **Date** – run it on a specific date
44+
* **Month and weekday** – run it on a specific weekday
4545

46-
#### Specific Date
46+
#### Date
4747

4848
This allows you to run the event on the same date every year (for example, April 5th).
4949

5050
| Property | Description |
5151
| --- | --- |
52-
| Date | The month and day on which to execute the event. |
53-
| Time | The time at which to execute the event. |
54-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
52+
| Date | The month and day on which to run the event. |
53+
| Time | The time at which to run the event. |
54+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
5555
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
5656

5757
{{% alert color="warning" %}}
58-
It is possible to select the leap day (February 29). In non-leap years the event will then be executed on February 28th.
58+
It is possible to select the leap day (February 29). In non-leap years, the event will be run on February 28th.
5959
{{% /alert %}}
6060

61-
#### Specific Month and Weekday
61+
#### Month and Weekday
6262

6363
This allows you to run the event on a certain day of the week every year. For example, the first Monday in April.
6464

6565
| Property | Description |
6666
| --- | --- |
67-
| Month | The month in which to execute the event. |
68-
| Day | The day on which to execute the event. |
69-
| Time | The time at which to execute the event. |
70-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
67+
| Month | The month in which to run the event. |
68+
| Day | The day on which to run the event. |
69+
| Time | The time at which to run the event. |
70+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
7171
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
7272

7373
### Monthly Properties {#monthly}
7474

75-
Monthly events also come in 2 flavors:
75+
You can also specify how a monthly scheduled event is run in two different ways by specifying the **Input type**:
7676

77-
* Execute on a specific day of the month
78-
* Execute on a specific weekday
77+
* **Particular day** – run it on a specific day of the month
78+
* **Weekday** – run it on a specific weekday
7979

8080
#### Particular Day
8181

8282
This allows you to run the event on the same date every month, or number of months (for example, the 5th of each month).
8383

8484
| Property | Description |
8585
| --- | --- |
86-
| Interval | The number of months in between executions of the event. This must be a divisor of 12. |
87-
| Months | The months in which the event will be executed; not visible when executing every month. |
88-
| Day | The day of the month on which to execute the event. |
89-
| Time | The time at which to execute the event. |
90-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
86+
| Interval | The number of months between each running of the event. This must be a divisor of 12. |
87+
| Months | The months in which the event will be run; not visible when running every month. |
88+
| Day | The day of the month on which to run the event. |
89+
| Time | The time at which to run the event. |
90+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
9191
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
9292

9393
{{% alert color="warning" %}}
94-
The selected day might not exist in all selected months. In those months the event will be executed on the last day of the month.
94+
The selected day might not exist in all selected months. In those months, the event will be run on the last day of the month.
9595
{{% /alert %}}
9696

9797
#### Weekday
@@ -100,21 +100,21 @@ This allows you to run the event on a certain day of the week every month, or nu
100100

101101
| Property | Description |
102102
| --- | --- |
103-
| Month | The month in which to execute the event. |
104-
| Day | The day on which to execute the event. |
105-
| Time | The time at which to execute the event. |
106-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
103+
| Month | The month in which to run the event. |
104+
| Day | The day on which to run the event. |
105+
| Time | The time at which to run the event. |
106+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
107107
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
108108

109-
#### Weekly Properties {#weekly}
109+
### Weekly Properties {#weekly}
110110

111111
This allows you to run the event on certain days every week. For example every Monday, Wednesday, and Friday.
112112

113113
| Property | Description |
114114
| --- | --- |
115-
| Days | The days of the week on which to execute the event. |
116-
| Time | The time at which to execute the event. |
117-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
115+
| Days | The days of the week on which to run the event. |
116+
| Time | The time at which to run the event. |
117+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
118118
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
119119

120120
### Daily Properties {#daily}
@@ -123,8 +123,8 @@ This allows you to run the event every day.
123123

124124
| Property | Description |
125125
| --- | --- |
126-
| Time | The time at which to execute the event. |
127-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
126+
| Time | The time at which to run the event. |
127+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
128128
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
129129

130130
### Hourly Properties {#hourly}
@@ -133,9 +133,9 @@ This allows you to run the event every hour, or number of hours. It also allows
133133

134134
| Property | Description |
135135
| --- | --- |
136-
| Interval | The number of hours in between executions of the event. This must be a divisor of 24. |
137-
| Offset (minutes) | The offset in minutes from the start time of an event period. For instance, set to 90 in order to execute halfway during a 3 hour interval. The offset must be shorter than the specified interval. |
138-
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time), below, for more information. |
136+
| Interval | The number of hours between each running of the event. This must be a divisor of 24. |
137+
| Offset (minutes) | The offset in minutes from the start time of an event period. For instance, set to 90 in order to run halfway during a 3 hour interval. The offset must be shorter than the specified interval. |
138+
| UTC/Server | Whether to use UTC or a local time set on the server. See [Server Time](#server-time) below for more information. |
139139
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
140140

141141
Example times will be shown in the dialog to illustrate the effects of the offset.
@@ -148,51 +148,48 @@ This allows you to run the event every minute, or number of minutes.
148148

149149
| Property | Description |
150150
| --- | --- |
151-
| Interval | The number of minutes in between executions of the event. This must be a divisor of 60. |
151+
| Interval | The number of minutes between each running of the event. This must be a divisor of 60. |
152152
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
153153

154154
### Long-Running Events {#long-events}
155155

156-
If a repeated scheduled event takes longer than the interval, an overlap would occur. To prevent this a choice must be made on how to handle this. This is set in the **On overlap** property of the scheduled event.
156+
If a repeated scheduled event takes longer than the interval, an overlap would occur. To prevent this, choose one of the following options in the **On overlap** property of the scheduled event:
157157

158158
* **Skip next** – If an event takes longer than its interval, subsequent events are skipped until it has completed. The next event will start at the next available scheduled time.
159159

160-
This is the default and will ensure that events are always executed at a scheduled time, subject to queue resources being available (see [Running Concurrently](#concurrently), below).
160+
This is the default and will ensure that events are always run at a scheduled time, subject to queue resources being available (see [Running Concurrently](#concurrently), below).
161161

162-
* **Delay next** – If an event takes longer than its interval, the next event is delayed until it has completed. The next event will start immediately after the previous one has completed and will likely not be executed at a scheduled time.
162+
* **Delay next** – If an event takes longer than its interval, the next event is delayed until it has completed. The next event will start immediately after the previous one has completed and will likely not be run at a scheduled time.
163163

164-
If multiple successive events are longer than their interval, the intended scheduled time will be further and further away from the actual start time. This situation should be avoided by choosing an interval that is generally sufficient to execute the event.
164+
If multiple successive events are longer than their interval, the intended scheduled time will be further and further away from the actual start time. This situation should be avoided by choosing an interval that is generally sufficient to run the event.
165165

166-
Should an event have drifted a long way from its intended schedule over time, the best way to remedy this is to delete the event and create a new one (with a longer interval).
166+
If an event has drifted a long way from its intended schedule over time, the best way to remedy this is to delete the event and create a new one (with a longer interval).
167167

168-
## Additional information
168+
## Additional Information
169169

170170
### Server Time{#server-time}
171171

172-
Although you can choose **Server** time rather than **UTC** time, please make sure that your server time is set as you expect. Many servers are set to run on UTC to avoid issues when working across timezones.
172+
You can choose **Server** time rather than **UTC** time, but make sure that your server time is set as you expect. Many servers are set to run on UTC to avoid issues when working across time zones.
173173

174174
{{% alert color="warning" %}}
175175
All Mendix Cloud servers are set to UTC.
176176
{{% /alert %}}
177177

178178
### Daylight Saving
179179

180-
If the chosen time zone is UTC, then an event will always execute at the specified time.
181-
However, if server time is chosen there may be daylight saving for the configured time zone (in the app's runtime settings).
182-
If a time is chosen which is in the daylight saving time window (the time at which the clocks change, for example between 01:00 and 03:00 in Europe), then that time will not occur on one day of the year and occur
183-
twice on another day of the year. The scheduled event will not be affected by this and will execute exactly once on those days.
180+
If the chosen time zone is UTC, then an event will always be run at the specified time. However, if server time is chosen there may be daylight saving for the configured time zone (in the app's runtime settings). If a time is chosen which is in the daylight saving time window (the time at which the clocks change, for example between 01:00 and 03:00 in Europe), then that time will not occur on one day of the year and occur twice on another day of the year. The scheduled event will not be affected by this and will run exactly once on those days.
184181

185182
### Running Concurrently{#concurrently}
186183

187-
No more than ten scheduled events can run in parallel per cluster node. Additional scheduled events will be queued and run in "first in, first out" order as currently running events finish.
184+
No more than ten scheduled events can be run in parallel for each cluster node. Additional scheduled events will be queued and run in "first in, first out" order as currently running events finish.
188185

189186
This limit cannot be overridden.
190187

191188
### Unsupported Intervals
192189

193-
Hour- and minute-based intervals can only be integer divisors of 24 or 60, respectively. For example you cannot schedule an event to run every seven minutes as this does not divide precisely into sixty minutes. If it is absolutely critical that an unsupported interval is used, you should schedule the event with interval value of one (every hour or every minute) and decide within the microflow whether it should continue executing at that particular time.
190+
Hour- and minute-based intervals can only be integer divisors of 24 or 60, respectively. For example you cannot schedule an event to be run every seven minutes as this does not divide precisely into 60 minutes. If it is absolutely critical that an unsupported interval is used, you should schedule the event with interval value of one (every hour or every minute) and decide within the microflow whether it should continue at that particular time.
194191

195-
### Cleaning Up Completed Runs of Scheduled Events
192+
### Cleaning Up Completed Scheduled Events
196193

197194
Every time a scheduled event is run it produces an entry in the `System.ProcessedQueueTask` table in the database. Over time these accumulate and the table can grow large. Refer to the documentation on [Cleaning Up Old Processed Tasks](/refguide/task-queue/#cleanup) in *Task Queue* to learn how to remove processed entries.
198195

0 commit comments

Comments
 (0)