Possible Duplicate:
executing a c# function after each 24 hours
How can job be set to automatically be done at night 12 by asp.net or c#
ASP .NET isn't really a job scheduler and shouldn't be used as one. It's a web-based request/response system and generally only does things when actively requested to do so by some client.
What you're looking to do, depending on the details of the task(s), can be done with:
- A console application (which can be written in C#, satisfying that requirement) scheduled to run (such as with the native Windows task scheduler)
- A Windows Service (also written in C#)
- A SQL job (which can also run C# code or access an application (as above) which is external to the database)
精彩评论