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

B

BLUE

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

BLUE said:
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
 
M

Mr. Arnold

BLUE said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top