471,305 Members | 1,116 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,305 software developers and data experts.

Windows Service Functionality using IIS/Application Servers

Hi:
I am looking for any ideas/comments/suggestions on how a Windows
Service kind of functionality can be acheived from a web application
which which will run under IIS or for that matter any application
server say Tomcat. I have a Windows service which should run every half
hour and call four different methods in a Web Service in serial mode.
The methods will have to wait for the previous one to finish and if the
previous one is a really long process (say 15 minutes) the subsequent
method will not get invoked till the previous one gets finished. That
leaves us to either implement a Windows Service for each method (which
might be tough maintaining services as the number of methods increase)
or a MultiThreaded application so that each method will run in Parallel
in its own thread in the same service.

But, what we are particularly looking for is " Do we really need a
Windows Service to achieve this task?". Can it not be an application
that will start and run along with an Application Server since ASP.Net
has it own Timers Class and all of these scheduling activities can be
achieved using that? I am looking for any tips/suggestions or even if
this is possible at all?

Thanks.

Jan 18 '06 #1
3 2022
I don't understand where ASP.NET comes into this. You basically have a
task that needs to run every 1/2 hour, right? Just write it as an EXE and
then set it up as a scheduled task which runs every 1/2 hour, and that's it.

Whether or not you make the calls to the four web services in serial or
parallel is up to you.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"nkunapa" <nk**********@uth.tmc.edu> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
Hi:
I am looking for any ideas/comments/suggestions on how a Windows
Service kind of functionality can be acheived from a web application
which which will run under IIS or for that matter any application
server say Tomcat. I have a Windows service which should run every half
hour and call four different methods in a Web Service in serial mode.
The methods will have to wait for the previous one to finish and if the
previous one is a really long process (say 15 minutes) the subsequent
method will not get invoked till the previous one gets finished. That
leaves us to either implement a Windows Service for each method (which
might be tough maintaining services as the number of methods increase)
or a MultiThreaded application so that each method will run in Parallel
in its own thread in the same service.

But, what we are particularly looking for is " Do we really need a
Windows Service to achieve this task?". Can it not be an application
that will start and run along with an Application Server since ASP.Net
has it own Timers Class and all of these scheduling activities can be
achieved using that? I am looking for any tips/suggestions or even if
this is possible at all?

Thanks.

Jan 18 '06 #2
Thanks. I just gave ASP.net as an example. Well, I would say a
scheduled task in also one of the options but it might only add
additional code to keep track if the previous scheduled task has really
completed as the task that is supposed the run at the next half hour
cycle is supposed to run only if the previous task has completed. I am
not if this functionality can be achieved by creating an EXE and
setting it up as scheduled task unlike a windows service. I mean one of
the four methods may be still running while three others might have
completed. Then the second half hour cycle should only process the
three that were completed in the first cycle.

The basic question I am asking is "Is is possible to set up an
application to attach itself to an Application Severs
(IIS/Tomcat/...etc) and run as soon the application server starts?".

Thanks.

Jan 18 '06 #3
Unless the server has a hook to allow this, no, it is not possible,
there is not a general mechanism to allow you to do this.

However, I don't see how this is related to you having a task running
every half hour. I mean, if you set it up as a scheduled task, you dont
need another service to tell you to start, the scheduled task service will
just handle it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"nkunapa" <nk**********@uth.tmc.edu> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Thanks. I just gave ASP.net as an example. Well, I would say a
scheduled task in also one of the options but it might only add
additional code to keep track if the previous scheduled task has really
completed as the task that is supposed the run at the next half hour
cycle is supposed to run only if the previous task has completed. I am
not if this functionality can be achieved by creating an EXE and
setting it up as scheduled task unlike a windows service. I mean one of
the four methods may be still running while three others might have
completed. Then the second half hour cycle should only process the
three that were completed in the first cycle.

The basic question I am asking is "Is is possible to set up an
application to attach itself to an Application Severs
(IIS/Tomcat/...etc) and run as soon the application server starts?".

Thanks.

Jan 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Sunil Varma | last post: by
reply views Thread by =?Utf-8?B?U2ltb25EZXY=?= | last post: by
reply views Thread by rosydwin | last post: by

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.