create and configure scheduled event programatically

I want to create a scheduled event depending on a user's input of when (monthly/weekly and on which day and time) to receive these email notifications.
1 answers

This is a requirement that you see in a lot of projects. There are two ways to implement this in Mendix.

The first is to create a setup of entities to configure what type of functionality must run on a specific moment. In the modeler you create a scheduled event that runs every 15 minutes and checks if there are any functions to execute. The time of each functions must be as simple as possible. For example use a float attribute for the time: 3.15 stands for 3:15 AM. This makes the Xpath queries easier. When the functions takes longer than 15 minutes, Mendix will hold every 15 minutes scheduled event trigger untill the previous trigger is finished.

An other option is to implement this with Java Timer functionality. The timer can be triggered at any time and interval, but you need to write custom Java code yourself. Also stopping the Timer must done by yourself. The interval is done in milliseconds so little bit of calculation is needed.