• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 353
  • Last Modified:

Wake up ASP.NET app for housekeeping

What are some approaches for "waking up" an ASP.NET application according to a  recorded schedule, in order to perform various levels of housekeeping?  

I can see using a user page request to trigger a check of the housekeeping schedule, but this seems like a lot of overhead in running the check, and what if no one's logged on, and it's midnight on Sunday and time for a housekeeping run?

Does this require a separate app that runs all the time?   Is there some automagic "wake up and run" batch file?  

I'm looking for some starting points on this one.

Thanks!
0
codequest
Asked:
codequest
  • 3
  • 3
2 Solutions
 
strickddCommented:
Some servers support Cron jobs which will allow you to run a small script or batch file. You can also setup a batch file in windows scheduled tasks i believe. That way everyday at a specific time you can have you script run for your "house keeping".
0
 
codequestAuthor Commented:
strickdd:  Thanks for input.  I'll look into those points.  Earns a split, at minimum.

Anyone else?
0
 
strickddCommented:
Some other ideas you can try would be to write your own program in VB or C# that has a timer and every, say 24 hours, it performs the actions you need it too. You can also consider setting up a seperate ASP.Net application that has a timeout of say 30 days. You can thread this as well so that every 24 hours it will do the task you need it to. Then you only need to access this page once every 30 days. The session should stay active even if you close your window.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
codequestAuthor Commented:
Ah, maybe that's the clue...."session should stay active even if you close your window...timeout of 30 days".
I'll take a look at that and see how that's going to fly on shared hosted servers (I may start there, and work up to dedicated.)

Any links to details on this?

Thanks!
0
 
strickddCommented:
All you need to do is set the session timeout really high. Also, you have to be sure your application is not in a recycling application pool.
0
 
codequestAuthor Commented:
strickdd:  Lot of clues in here (along with complete), which I found from following your suggestions.

http://msdn.microsoft.com/msdnmag/issues/05/03/SchedulingASPNETCode/
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now