Results 1 to 5 of 5

Thread: Call a web service at regular intervals

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    589

    Call a web service at regular intervals

    Sorry if this is the wrong forum - not sure where to start with this one.

    I have a web service that calls a stored procedure to retrieve a list of users and email addresses from a database and sends reminder emails to them.

    I need to set it up so this web service runs once a day automatically. What is the best | simplest | most reliable way of doing this? Thanks for any input. My first thoughts are a 'windows service' but I've never built one before. I've looked at the documentation and thought 'sounds like a thousand things could go wrong there' if, like me, you know very little about Windows.

    Thanks for any help.

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Call a web service at regular intervals

    If this runs on a stable server i would recommend a windows service.
    I understand the problems you are facing with windows service so i will recommend another thing.How about creating a console app that will do what you want and have it run on windows scheduler once every every day?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Call a web service at regular intervals

    Hello,

    The creation of a Windows Service is actually quite a simple thing to do, so I wouldn't be too scared about trying it out.

    What I would say though is, if you already have a Web Service that does all the work, and essentially all you want to do is "kick" the web service to go off and do it, then a Windows Service is a little bit of overkill.

    In which case, like Sap, I would suggest the use of a Console Application, which references the Web Service, calls the Web Method, and then goes away. Then use Windows Scheduled Tasks to execute this console application every day.

    This assumes that you have direct access to the server you are running on, or that you have access to another machine that is always running.

    Gary

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    589

    Re: Call a web service at regular intervals

    Thank you both for your replies. I'll give the console app a try. I guess I'm a bit odd as developers go - I started on Macs doing database driven publishing (printed flight schedules kept in Filemaker - and exported and automatically formatted into Quark for publishing) - I only moved to Windows when web development moved from static pages into database driven web sites - so, when I needed a 'proper' database (SQL Server) I had to move to Windows and asp web sites.

    So, I've never run a console app in my life - so, here goes - hope you don't mind me asking for help here as I do it. Thanks.

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Call a web service at regular intervals

    Hello,

    Nope, I don't mind you asking questions here, although this is the ASP.Net Forum, so if you are not getting the answers you need, we might need to move the thread over to another forum But we will see how we get on.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width