Error when configuring specified scheduled events on-premise

Using Mendix Service Console 4.2.1 I'm trying to configure scheduled events for Mendix 5.13.1 When I set the Scheduled event execution to "SPECIFIED". (ScheduledEventExecution: SPECIFIED). In my Settings.yaml based on the [this answer][1] I added the following to my Settings.yaml: Runtime: MyScheduledEvents: - Module.Event1 - Module.Event2 When I do so, it gives me the following error System.InvalidCastException: Unable to cast object of type 'System.Yaml.YamlSequence' to type 'System.Yaml.YamlScalar'. at Mendix.M2EE.Settings.LoadSettings(YamlMapping configMapping) at Mendix.M2EE.Settings.<>c__DisplayClass1.<GetInstances>b__0(DirectoryInfo appPath) [1]: If I just add the following, it works, but only for one event MyScheduledEvents: Module.Event1 It's acting as if it can't parse the array because it expects it to be a single value.
2 answers

It depends on which type of environment you are working.

On a windows server you should never manually change the yaml file. The service console interprets the yaml settings differently than the linux m2ee tools.

On linux in the yaml you can specify the list of scheduled events as you mentioned in your post, underneath the 'MyScheduledEvents:' value (on 1 whitespace indentation). Followed by the scheduled events you want to enable.
Each scheduled event should be specified on a new line, 2 white space indentation and with a - character in front of it.
Also see this github page line 501

On windows you have to configure this through the service console. Under menu item 'Configuration' you can specify that you want to have a 'specified' list of scheduled events.

When you choose specified you have to go to the advanced configuration (bottom right corner of the same popup) and in the custom settings you'll have to add an option with name: MyScheduledEvents and in the value a comma separated list of the scheduled events: Module.ScheduledEventName1,Module.Module.ScheduledEventName2,Module.Module.ScheduledEventName3
No quotes, whitespaces, colons, etc. just the full scheduled and the comma to separate the events.



You need to specifically adhere to the structure and indentations of the yaml file, else it will throw errors. Did you add a comma after the scheduled events except for the last one? It should look like:

MyScheduledEvents: "Module.Comma,Module.Separated,Module.Stuff"

Note the double quotes and the comma's, also be sure the characters start at the beginning of the line