I am into shared hosting and they do not allow me to use windows scheduler... So what are the ways of achieving scheduled tasks ie(timed mail) in asp.net... I just saw background process by Jeff Atwood blog... Is it relaible? Or any other ways of doing scheduled tasks...
Then i found quartz.net but i can't find a simple example that embeds quartz.net into an asp.net(without installing a Quartz.Net server as a standalone windows service)... Any suggestion on quartz.net...
You could simply write an ASP.Net page that performs your task, e.g. sending the mails. Then use an online scheduling service like SetCronJob to call the URL of the page on your server on a schedule.
The downside of this very simple approach is that you are dependent on an external service.
I was investigating Microsoft.Web.Administration assembly Schedule Class to achieve same thing but it seems that class can be used only to schedule IIS worker process restart, here is the example of creating app pools and setting periodical restart.
So only way was to schedule with this was ASP.NET app restart and then in Application_Start do the scheduled work. But that is ugly hack not solution, so at the end I ended up adding scheduling capabilities to our homegrown backup windows service that was allready running on web server, so IMO Quartz.net is the best solution for you. Maybe you could convince your web provider to install Quartz.net all other solutions seems like a hack that will give you more or less problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With