Home > Software design >  C# and ASP.NET timer function that runs sql only once a week
C# and ASP.NET timer function that runs sql only once a week

Time:03-31

I have just started learning asp.net and C#. I need to create a function that runs once a week, every Monday and returns a new entry in my SQL database.

Does anyone have any suggestions for how I should approach this? And are you aware of any ways to have this kind of functionality without a data log table that checks if the function has already been run for that week?

CodePudding user response:

Try Hangfire - it can schedule a job and repeat it.

CodePudding user response:

There are some solutions to do this. Check this out: [https://www.hanselman.com/blog/how-to-run-background-tasks-in-aspnet][1]

  • Related