473,654 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Schedule the call of a Web Service method: task scheduler or Windows Service?

I've to call 2 web method from time to time so that the web service will do
cleanup and sync jobs on a database.

These methods can be called once every X days where X >= Y for the sync
method and X >= Z Y for the cleanup method with Y and Z specified by the
user in the app.config file.

Is it best to create a web service client app and schedule it with Windows
Scheduler or to create a web service client Windows Service that will use a
timer to call the web methods?
Thanks,
Luigi.
Jun 3 '07 #1
3 16217
Luigi,

I definitely think it is better to create the web service client app and
run it through windows scheduler. To have a service run and do nothing for
the majority of the time is just wasteful.

You might have to schedule the app to run for the lowest common
denominator, and then do a conditional check in your code based on whether
or not you want it to run (as you listed some conditions), but this isn't
too hard to do.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"BLUE" <bluewrote in message news:uv******** ******@TK2MSFTN GP02.phx.gbl...
I've to call 2 web method from time to time so that the web service will
do cleanup and sync jobs on a database.

These methods can be called once every X days where X >= Y for the sync
method and X >= Z Y for the cleanup method with Y and Z specified by the
user in the app.config file.

Is it best to create a web service client app and schedule it with Windows
Scheduler or to create a web service client Windows Service that will use
a timer to call the web methods?
Thanks,
Luigi.
Jun 3 '07 #2
BLUE wrote:
I've to call 2 web method from time to time so that the web service will do
cleanup and sync jobs on a database.

These methods can be called once every X days where X >= Y for the sync
method and X >= Z Y for the cleanup method with Y and Z specified by the
user in the app.config file.

Is it best to create a web service client app and schedule it with Windows
Scheduler or to create a web service client Windows Service that will use a
timer to call the web methods?
I would say that the best is to run something by windows or sqlserver
scheduler on the server.

And scheduling a web service client app on the client is only best
workaround.

Arne
Jun 3 '07 #3

"BLUE" <bluewrote in message news:uv******** ******@TK2MSFTN GP02.phx.gbl...
I've to call 2 web method from time to time so that the web service will
do cleanup and sync jobs on a database.

These methods can be called once every X days where X >= Y for the sync
method and X >= Z Y for the cleanup method with Y and Z specified by the
user in the app.config file.

Is it best to create a web service client app and schedule it with Windows
Scheduler or to create a web service client Windows Service that will use
a timer to call the web methods?
You create a Console application to consume the Web Services and run it with
the Windows NT Scheduler or some kind of 3rd party job scheduler.

Jun 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
274
by: Andy | last post by:
Hi I am developing a Windows Service application in C# which is designed to run at predetermined time everyday. My question is once my service starts what is the best way for it to run without hogging lots of resource from the CPU? I guessed at some sort of timer approach? Any suggestions gratefully recieved :-) Thanks in advance
0
264
by: KK | last post by:
Hi Is there a way to call a static method in a service? For example, NT service is an instance of a class. ServicesToRun = new System.ServiceProcess.ServiceBase { new FooClass() }; I want to findout wether a static mthod in this FooClass can be accessed from another assembly in another application ?
3
3019
by: DH | last post by:
I hope this is a right place to post my question I'm working on a Windows service application with VB.net. The purpose is to let the service application as a monitor to periodically check a launching flag file. If the flag was found the service will trigger to run a finance calculating program (VMPE4SRVAPP.exe, a VB 6.0/Access application but without windows interface). I added a Process and two Timers on the Service to do checking and...
1
3450
by: Meena Desai | last post by:
Hi, Can I call a web page of my site from my Windows Service? How? Thanks in advance. Meena
2
3003
by: SBh. via DotNetMonster.com | last post by:
I already created a windows service that receive parameter in Sub GetValue () and I can registered and started service successfully. But unfortunately, I don't know how to write program to call this windows service. Anyone can help me and give me some example code, please .... My windows service source code are as below : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Protected Overrides Sub OnStart(ByVal...
1
4436
by: Andrea Moro | last post by:
I need to do something that should be easy but it's revealing quite hard. Upload a large number of sql insert string to a remote db. I cannot use the sql 2000 web services, so this isn't the right way. In a first manner I started to write a simple web pages that load a remote file, unzip it and simple cycle the content of the stream and for each line run a sqlcommand. but because the lines grow up every day, I saw that a medium file of...
0
8267
by: =?Utf-8?B?QWRyaWFuIENvbGU=?= | last post by:
I have written a simple WCF service hosted in a Windows console application and a simple WCF client console application that connects successfully to that service and retrieves data. I then ported the console application to WinForms and also got that to work properly. My next move was to host the WCF service in a Windows service application. I believe I have that working correctly, but I can't for the life of me get a client to connect...
2
1682
by: deepadeshmukh | last post by:
How to call an external process from Windows service in C#2.0? This code doesnt works protected override void OnStart(string args) { Process.Start("C:\\Documents\\sessiondemo\\sessiondemo\\bin\\Debug\\Sessiondemo.exe"); }
0
5709
by: khurramlone | last post by:
I am trying to generate a client proxy from a WCF service library. I am using VS2005, .NET 3.0 on a Windows XP Pro workstation. The WCF service is hosted in a windows service. When I run the windows service as a console application, there are no problems. I can run svcutil.exe against that address and it generates the proxy. However, when I compile that service in release mode, and install it on the workstation using InstallUtil, I get an error...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2714
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.