2
I need method to perform tasks every day at the same time which class should I use for this type of task?
2
I need method to perform tasks every day at the same time which class should I use for this type of task?
Browser other questions tagged c# asp.net-web-api
You are not signed in. Login or sign up in order to post.
You could use the https://www.hangfire.io/ or https://www.quartz-scheduler.net/ libraries to do this, they serve to configure routines in your system to be executed at certain scheduled times
– Jeferson Almeida
@Randrade this question is not a duplicate of the given. This is about ASP.NET, the other is about . NET in general. The way to schedule the execution of a task is different when you use ASP.NET.
– Oralista de Sistemas
This may be useful. https://msdn.microsoft.com/pt-br/library/system.timers.timer.aspx
– Jefferson Hillebrecht
@Renan The question may be using different tags, but I believe the answers will be similar, if not the same.
– Randrade
@Randrade will not be, as they are two completely different environments. What works for Windows Forms and Windows services does not work for ASP.NET.
– Oralista de Sistemas
@Renan The three answers may be appropriate to the question. The difference is that one speaks explicitly of
Windows Services
, that needs to create something more, but not exclusionary. However, the other answers show forms that work for both Winforms and Asp.Net MVC, Web API and even . NET Core.– Randrade
Does it need to be at a specific time every day (e.g., every day at 4:00 in the morning) or whatever the time, as long as it is at the same time every day (e.g., if the app started at 1:37, let it be every day the same time)? Anyway, I particularly use the Fluent Scheduler, I find it more practical than the others, besides being open source. But I believe that both situations can also be done with the others cited.
– Alisson
@Alisson Specific time
– Eduardo Sampaio