Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have windows server 2008 and ASP.NET application running on it. There is a page that renews all subscribers and should be run every 1 hour or so. I want to have this done automatically every hour.

Problem is if i assign Windows Schedule Task to it and make page with code a homepage it will open 24 browser windows per day. I can write a page that auto closes after execution with Javascript on it ( window.close() ) but is there any other more elegant way to execute the page on Windows Server 2008 ?

share|improve this question
    
Why are you doing this trough a web page? Wouldn't it be easier to create a web service, then call it on schedule? –  MainMa Jul 18 '10 at 7:02
    
Can i access web services from scheduling? Anyway i don't know to create a service unless it is web service. –  eugeneK Jul 18 '10 at 7:05
    
@eugeneK: I talked about web services since it will easily let you access the resource programmatically, outside the browser. In general, unless the page has to be accessed by regular users, there is no need to do an ASPX page. –  MainMa Jul 18 '10 at 7:09
    
you're right about services but i've never wrote one. I mean WCF ones because you cannot execute simple web service from Windows. I think i will stick to wGet and Task Scheduler at the moment. thanks anyway. –  eugeneK Jul 18 '10 at 7:20
1  
Writing both WCF and web services is as easy as creating a new ASPX page. Both can be hosted in IIS. So you have only to choose a good template in Visual Studio (if you are using VS). Try it. Good luck. –  MainMa Jul 18 '10 at 7:23

1 Answer 1

up vote 1 down vote accepted

You have several solutions.

  1. Use Wget to load a page without opening a browser.

  2. If you are a developer, create your own Windows service which will load the page on background every hour. I'm not sure it is better than using Wget with Task Scheduler.

  3. If there is no reason the have a web page doing subscribers renewal, do a web service or a WCF service instead, then call it once per hour either through a Windows service or a simple application called through Task Scheduler.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.