We have a website where we need a scheduler to receive notifications (e-mail) on specific time. eg. a person setting reminder at 5 PM to attend the meeting at 4:45 PM, will rece
How about this: Simulate a Windows Service using ASP.NET to run scheduled jobs.
At one point this technique was used on Stack Overflow, although I don't think it is any more.
To be honest it seems like a nasty, error-prone hack to me, but if you're unable to run anything on the server except your website then something like this is probably your only option.
I don't belive you, because source code of Quartz.Net (1.0 and 1.0.1) doesn't compile under Visual Studio.Net 2005 and 2008. The only way to get Quartz.Net is to use whole Spring.Net package, which compiles fine under VS.Net 2005 and 2008
Unless you could share some tips, how to compile and use quartz.dll in asp.net project! (web page of Quartz.Net and readme.txt doesn't provide any information on source coude compilation) Every tip is welcomed!
I had trouble at first as well, but this is because the necessary AsemblyInfo.cs is contained in the parent folder. Also, you'll need to add the three DLLs that are included.
I don't belive you, because source code of Quartz.Net (1.0 and 1.0.1) doesn't compile under Visual Studio.Net 2005 and 2008. The only way to get Quartz.Net is to use whole Spring.Net package, which compiles fine under VS.Net 2005 and 2008
Unless you could share some tips, how to compile and use quartz.dll in asp.net project! (web page of Quartz.Net and readme.txt doesn't provide any information on source coude compilation) Every tip is welcomed!
I had the same problem as you and I ended up with a programming a service that utilize Quartz.NET: http://quartznet.sourceforge.net/ and connect to the same database as the website.
You need to have a job done at the server, but you have no good way of triggering it from ASP.NET?
How about creating a webpage that will start your job, and have a timer run elsewhere (ie. on another computer) that requests that page. (Just hitting the page to trigger you jobs)
However if you really are completely stuck and have no choice but to host it in your WebApp,
You could look at creating a System.Timers.Timer
instance in your Global.asax.cs file. Wire up a Elapsed event as you normally would, and give it some code that does something along the lines of
protected void myTimer_Elapsed(object sender, EventArgs e)
{
if(System.DateTime.Now Falls in Some Configured Time-Window)
//Do Stuff
}
But as someone pointed out, its not guaranteed as IIS might be resetting during that period, in which case you'll miss it.