c# - How to create a time based event in a MVC5 website? -
What is the best design for time-based events? For example, sending a reminder to users, for example, as 60 days after their last login or after that?
The system is currently built on MVC 5 5, so I was thinking of adding some chronos to the action in the Base Controller that will trigger all investigations and stuff and all incident-based functions.
I was thinking that another approach was to actually create a desktop app and it is running all the time and gets push notifications on the new user's registration on the SQL server and after that Just keep the list and ask the server to send email as soon as you send it to 60 days, or to get the last login date for every day and to send the required email to any user.
I found it on another question:
And wanted to ask if it would be a better option for the system?
A better example would be that a newsletter should be sent to some users every month. How will this be implemented?
So finally I ended up using quartz.net. I triggered the MVC application and created jobs and a different server ran a console app that executes triggers and jobs.
This can be determined by Scheduler.Start (); In the console app and not in the web app.
In addition, jobs and triggers are stored on a SQL server (blue SQL) rather than a RAM so that both machines can access them.
I also have to make sure the watches were in sync and
& Lt; Add key = "quartz.jobstore.clustered" value = "true" />
Both systems should work in clusters!
Comments
Post a Comment