Hi guys. I have one question. I need RecurringJob that will do something every hour. Lets say for example send an email. Every tutorial is doing same thing, something like this:
RecurringJob.AddOrUpdate(() => Console.WriteLine("Message goes here."), Cron.Hourly);
And they put that line of code in the Startup.cs/Prgoram.cs. But first of all, I guess we should not call it from Program.cs? But where should we place this line of code, since I dont want use Console.WriteLine but some methode from my services. For example:
RecurringJob.AddOrUpdate(() => _emailService.SendEmail(message), Cron.Hourly);