You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/refguide/modeling/resources/scheduled-events.md
+54-57Lines changed: 54 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,90 +8,90 @@ description: "Options for configuring scheduled events"
8
8
9
9
## Introduction
10
10
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.
12
12
13
13
A scheduled event is added to your module as a document (right-click your module and you will find it listed under *Add other*).
14
14
15
15
{{% 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*.
17
17
{{% /alert %}}
18
18
19
19
## Common Properties
20
20
21
21
| Property | Description |
22
22
| --- | --- |
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. |
25
25
26
26
## Execution Properties
27
27
28
28
| Property | Description |
29
29
| --- | --- |
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). |
32
32
33
33
## Timing Properties
34
34
35
35
| Property | Description |
36
36
| --- | --- |
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). |
38
38
39
39
### Yearly Properties {#yearly}
40
40
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**:
42
42
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
45
45
46
-
#### Specific Date
46
+
#### Date
47
47
48
48
This allows you to run the event on the same date every year (for example, April 5th).
49
49
50
50
| Property | Description |
51
51
| --- | --- |
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. |
55
55
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
56
56
57
57
{{% 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.
59
59
{{% /alert %}}
60
60
61
-
#### Specific Month and Weekday
61
+
#### Month and Weekday
62
62
63
63
This allows you to run the event on a certain day of the week every year. For example, the first Monday in April.
64
64
65
65
| Property | Description |
66
66
| --- | --- |
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. |
71
71
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
72
72
73
73
### Monthly Properties {#monthly}
74
74
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**:
76
76
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
79
79
80
80
#### Particular Day
81
81
82
82
This allows you to run the event on the same date every month, or number of months (for example, the 5th of each month).
83
83
84
84
| Property | Description |
85
85
| --- | --- |
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. |
91
91
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
92
92
93
93
{{% 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.
95
95
{{% /alert %}}
96
96
97
97
#### Weekday
@@ -100,21 +100,21 @@ This allows you to run the event on a certain day of the week every month, or nu
100
100
101
101
| Property | Description |
102
102
| --- | --- |
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. |
107
107
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
108
108
109
-
####Weekly Properties {#weekly}
109
+
### Weekly Properties {#weekly}
110
110
111
111
This allows you to run the event on certain days every week. For example every Monday, Wednesday, and Friday.
112
112
113
113
| Property | Description |
114
114
| --- | --- |
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. |
118
118
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
119
119
120
120
### Daily Properties {#daily}
@@ -123,8 +123,8 @@ This allows you to run the event every day.
123
123
124
124
| Property | Description |
125
125
| --- | --- |
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. |
128
128
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
129
129
130
130
### Hourly Properties {#hourly}
@@ -133,9 +133,9 @@ This allows you to run the event every hour, or number of hours. It also allows
133
133
134
134
| Property | Description |
135
135
| --- | --- |
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. |
139
139
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
140
140
141
141
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.
148
148
149
149
| Property | Description |
150
150
| --- | --- |
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. |
152
152
| On overlap | See explanation of options in [Long-Running Events](#long-events). |
153
153
154
154
### Long-Running Events {#long-events}
155
155
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:
157
157
158
158
***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.
159
159
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).
161
161
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.
163
163
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.
165
165
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).
167
167
168
-
## Additional information
168
+
## Additional Information
169
169
170
170
### Server Time{#server-time}
171
171
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.
173
173
174
174
{{% alert color="warning" %}}
175
175
All Mendix Cloud servers are set to UTC.
176
176
{{% /alert %}}
177
177
178
178
### Daylight Saving
179
179
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.
184
181
185
182
### Running Concurrently{#concurrently}
186
183
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.
188
185
189
186
This limit cannot be overridden.
190
187
191
188
### Unsupported Intervals
192
189
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.
194
191
195
-
### Cleaning Up Completed Runs of Scheduled Events
192
+
### Cleaning Up Completed Scheduled Events
196
193
197
194
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.
0 commit comments