How to change scheduler intervals using environmental variables?

0
How can I can change the interval of the scheduler using environmental variable?   For now I can only change schedulers interval in Mendix studio pro, but now I want to change interval in environmental details page of Mendix.   Is there a way? If so how?   Is there any other alternative way, I can change scheduler interval in real time (It is fine restarting environment but not re-deploying)   Example: I have scheduler which runs every 4 hours... I now want to dynamically changes the interval to 12 hours or any timing I wish for. How can I do this using environmental variable or suggest any way which will work   Thank you.
asked
2 answers
1

Hello Prabhu,

 

One way is to set the execution of the Scheduled event for example every hour and then create some logic within your scheduled event microflow with a decision wether or not to execute the full flow or not. 

 

You can for example make an entity with one object with the settings when it needs to be executed or not.

 

Hope this helps,

 

Good luck

 

I am btw curious of other options what other people prefer to use

answered
1

Explanation:

 

You create an SE that goes off more frequently than you want for example every minute:

 

image.png

 

Then create your set up like this 

image.png

 

Then add in SE_Decision your logic that you want for example a boolean that sign if the funcitonality is enabled:

 

image.png

 

Please be also aware to clean up your scheduled events that are executed within mendix everytime a SE is executed a record is created:

 

see alos the documentation:

 

https://docs.mendix.com/refguide9/scheduled-events-task-queue/

 

 

Good luck 

 

Hope this helps

 

answered