Groups | Blog | Home
all groups > dotnet faqs > may 2004 >

dotnet faqs : Diff. Windows Services


Hardip Wadhwa
5/21/2004 4:48:15 PM
Hi,

Thought.

What is the difference between Windows services and Scheduled tasks.?

I can run an application and attach it to Scheduled tasks.
It can do everything Start/STOP/schedule/User passwords.

What's the best benefit using Services?

Hardip




Eric Marvets
5/21/2004 10:16:50 PM
Services start when the machine starts and end when the system shuts down
(potentially).

Look at whats on the system implemented as services. Most of them are
'listeners' or 'watchers'. For example, IIS 'listens' to a TCP/IP port for
a user request and then acts upon it. Another example of a 'watcher' is a
custom service that uses the FileSystemWatcher class to monitor an FTP
directory for a file to show up and begin processing it.

If you just have something that needs to be done at a particular interval,
then a scheduled task works better. That way you are not slowing down the
system 24/7 with an extra process. Even if the process is mostly idle, is
still is appropriated memory space and access to the CPU.

--
Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email sales@bangproject.com for Information on Our Architecture and
Mentoring Services

</shameless self promotion>

Eric Marvets
5/24/2004 3:32:08 AM
You are right, you could do that.

Its just what they were designed for. Services can be started, stopped,
paused, etc. A task merely runs at a particular interval. Generally you
have a task run for a period of time and then shut down, while a service is
intended to run constantly.

--
Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email sales@bangproject.com for Information on Our Architecture and
Mentoring Services

</shameless self promotion>

Hardip Wadhwa
5/24/2004 9:18:17 AM
Hi Eric,

Thanks for the reply, But, why can't i start the 'listeners' or 'watchers'
in Scheduled tasks, when computer starts?

Potentially theses tasks will end when system shut down and restart when
system starts.

As services do take up memory and CPU process, the task is also very
similar.

So again why services is a different concept than tasks?

Hardip



[quoted text, click to view]

Venkat
8/1/2008 5:32:43 AM
Eric is right. But we can't use FileSystemWatcher class to monitor an FTP
directory. FileSystemWatcher path does not understand the FTP path

From http://www.developmentnow.com/g/5_2004_5_0_0_65355/Diff-Windows-Services.htm

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button