Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Timed Event

Status
Not open for further replies.

mcp87

MIS
Oct 5, 2004
17
US
I am trying to find a way to excute a block of code at the application level at certain times. Like every 48hour delete all user accounts that have not been activated is one of the things that i am trying to do .

Currently i have the block of code that does this set on the site and it runs every time the page is loaded. So it only runs if there is site activiity instead just evey 48hours on a constant basis.

Any help would be greatly apprecated.

Thanks
 
Probably the most suited way for this type of problem is to not use the ASP.NET application to do it as they should be used to handle requests, not start them.

You can make a Windows Service very easily that can do all of this.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Realistically if it was a server i had full access to the yes i agree with you that would be the best way to do resloved that task. But unfortuneally i do not have that kind of access to the server. Of course that brings somthing else to mind now that you have brounght that up. I could write a program in VB that that runs on a remote machine to access the database and accomplish this. But i would really like to keep all the code in the same place like on website server wheather in page code or application code.

If anyone else has some other suggestions please let me know thanks.
 
You could:

1) Create an ASP.NET page that does the relevant code
2) Create a vbs file that calls this page
3) Create a scheduled task on the server to call the vbs script

This method is outlined in but personally I wouldn't use this option (although it does work if you decide to).

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top