Scheduled event failed to trigger

1
We have mapped a java action to a Scheduled event of interval 2 minutes. Java code is to perform unzip file from FTP and store the extracted file into "System.FileDocument" entity.Usually, File size is around 40MB after extraction. Sometimes ,Scheduler failed to start with the stipulate interval of time. Even after previous scheduler status is completed. Please suggest some work around to restart the scheduled event without restarting the Mendix Server itself.
asked
2 answers
1

It is important to realize that the event tries to run at a 2 minute interval.

However the platform will never run the same scheduled event multiple times in parallel.
So if your action takes longer than 2 minutes, it will collect all events that needed to be started and will start them as soon as possible.

For example

00:00 Event 1 - Running (for the next 5 minutes)
00:01 Event 1 - Running - In Queue: Event 2
00:02 Event 1 - Running - In Queue: Event 2
00:03 Event 1 - Running - In Queue: Event 2 & Event 3
00:04 Event 1 - Running - In Queue: Event 2 & Event 3
00:05 Event 1 - Finished - Starting Event 2 (for the next 3 minutes) - In Queue: Event 3
00:06 Event 2 - Running - In Queue: Event 3 & Event 4
00:07 Event 2 - Running - In Queue: Event 3 & Event 4 & Event 5
00:07 Event 2 - Finished - Starting Event 3 (running for 10 minutes) - In Queue: Event Event 4 & Event 5
00:17 Event 3 - Finished - In Queue: Event Event 4 through 10
etc....

This does mean that you can get gaps in the interval, and it also means that your microflow will not run at the predicted times if one of the actions might take longer.

When setting up a scheduled event on such as small interval as this, it is important to set it up in such a way that the interval is longer than the time it takes to run. Otherwise it will just create unpredictable behavior (the data will start determining the interval)

answered
1

I would schedule not 1 event but for instance 5 events with 10 minutes interval. So at 0, 2, 4, 6,and 8 with a ten minutes interval. Because if for whatever reason a scheduled events 'hangs', the other one will still go on.

Regards,

Ronald

answered