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

Home Posts Topics Members FAQ

Create a "Service"?? ?

I've an application in which I use to check out the date/time stamp of a data
base... and if I find that it has been updated, my application runs and does a
particular update.

Currently I fire off my application hourly useing the built in XP Scheduler.

What I am going to do is to have my application check every minute while it is
running as I don't want to have to wait up to a hour for my particular update
to happen....

But what I am wondering about is IF I should just simply run my application
all the time in the background (there is no form needed to be visible while it
runs). Or is there a 'better' way to run my application using less resources,
etc? Is there anything special I need to do to make it a 'service'? Or what?

Any thoughts appreciated.

Regards,

Mr. B
Jul 21 '05 #1
11 1921
Yep,

Sounds like a service to me.

Oh, and make sure you use the system.timers.t imer object to trigger your
logic. And if you are using vb.net to create your service, the windows
service template works just fine, but you will have to add an installer
project, and change the name of your service from service1 to
"yourservicenam e".

I have created many services with much success.

Best of luck,

Chris Smith
"Mr. B" <Us**@NoWhere.c om> wrote in message
news:pm******** *************** *********@4ax.c om...
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update.

Currently I fire off my application hourly useing the built in XP Scheduler.
What I am going to do is to have my application check every minute while it is running as I don't want to have to wait up to a hour for my particular update to happen....

But what I am wondering about is IF I should just simply run my application all the time in the background (there is no form needed to be visible while it runs). Or is there a 'better' way to run my application using less resources, etc? Is there anything special I need to do to make it a 'service'? Or what?
Any thoughts appreciated.

Regards,

Mr. B

Jul 21 '05 #2
With Deft Fingers, "Chris Smith" <us**@email.com > wrote:
Sounds like a service to me.
I have created many services with much success.
But that's it... I don't know how to make a service (let alone where to begin)
(:

I've an existing app... am I going to have to re-write it?
logic. And if you are using vb.net to create your service, the windows
service template works just fine, but you will have to add an installer


I'm using VB.net (standard) 2003... and I can't even see where I can even
start a Service app... Hmmmm....

Regards,

Mr. B
Jul 21 '05 #3
You can't create a service with the standard edition (AFAIK) , you will need
to u/g to professional.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Mr. B" <Us**@NoWhere.c om> wrote in message
news:65******** *************** *********@4ax.c om...
With Deft Fingers, "Chris Smith" <us**@email.com > wrote:
Sounds like a service to me.
I have created many services with much success.
But that's it... I don't know how to make a service (let alone where to

begin) (:

I've an existing app... am I going to have to re-write it?
logic. And if you are using vb.net to create your service, the windows
service template works just fine, but you will have to add an installer


I'm using VB.net (standard) 2003... and I can't even see where I can even
start a Service app... Hmmmm....

Regards,

Mr. B

Jul 21 '05 #4
On Wed, 15 Sep 2004 03:51:06 GMT, Mr. B <Us**@NoWhere.c om> wrote:

¤ I've an application in which I use to check out the date/time stamp of a data
¤ base... and if I find that it has been updated, my application runs and does a
¤ particular update.
¤
¤ Currently I fire off my application hourly useing the built in XP Scheduler.
¤
¤ What I am going to do is to have my application check every minute while it is
¤ running as I don't want to have to wait up to a hour for my particular update
¤ to happen....
¤
¤ But what I am wondering about is IF I should just simply run my application
¤ all the time in the background (there is no form needed to be visible while it
¤ runs). Or is there a 'better' way to run my application using less resources,
¤ etc? Is there anything special I need to do to make it a 'service'? Or what?
¤

See if the following helps:

http://msdn.microsoft.com/library/de...l/vs0112dt.asp
http://tinyurl.com/5sjlb
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #5
Mr B.
As the others suggest I would create a Windows Service and use the
System.Timers.T imer.

Matthew MacDonald's book "Microsoft Visual Basic.NET Programmer's Cookbook"
has a number of topics on creating Windows Services.

I would recommend upgrading to VS.NET 2003 Professional if possible, if not
you can create a service by creating a regular Windows Application, deleting
the Form1 created. Add a new class to your project, have it inherit from
System.ServiceP rocess.ServiceB ase, set the project's Startup object to this
new class.

For details see:

http://msdn.microsoft.com/library/de...ClassTopic.asp

http://msdn.microsoft.com/library/de...plications.asp

http://msdn.microsoft.com/library/de...plications.asp

The last topic has a link on how to create a service without using the
designers...

Hope this helps
Jay

"Mr. B" <Us**@NoWhere.c om> wrote in message
news:pm******** *************** *********@4ax.c om...
I've an application in which I use to check out the date/time stamp of a
data
base... and if I find that it has been updated, my application runs and
does a
particular update.

Currently I fire off my application hourly useing the built in XP
Scheduler.

What I am going to do is to have my application check every minute while
it is
running as I don't want to have to wait up to a hour for my particular
update
to happen....

But what I am wondering about is IF I should just simply run my
application
all the time in the background (there is no form needed to be visible
while it
runs). Or is there a 'better' way to run my application using less
resources,
etc? Is there anything special I need to do to make it a 'service'? Or
what?

Any thoughts appreciated.

Regards,

Mr. B

Jul 21 '05 #6
This may be true in terms of project templates, but P/Invoke should
expose the Windows Services API as it always did. You basically just
need to create an executable and register it with the service manager,
which is explained (in C++) here:

http://www.gamedev.net/reference/art...rticle1899.asp

The code presented shouldn't be hard to translate to C# and P/Invoke.

The only complication I can see is that you'll probably have to write
your own message pump, old-school. This is annoying, but I don't
think it should be a deal-breaker. All the same, it's probably
cheaper and easier to simply upgrade to Professional.

Thanks,
Mike Burton
DPSI

"One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> wrote in message news:<u$******* *******@TK2MSFT NGP10.phx.gbl>. ..
You can't create a service with the standard edition (AFAIK) , you will need
to u/g to professional.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Mr. B" <Us**@NoWhere.c om> wrote in message
news:65******** *************** *********@4ax.c om...
With Deft Fingers, "Chris Smith" <us**@email.com > wrote:
Sounds like a service to me.
I have created many services with much success.


But that's it... I don't know how to make a service (let alone where to

begin)
(:

I've an existing app... am I going to have to re-write it?
logic. And if you are using vb.net to create your service, the windows
service template works just fine, but you will have to add an installer


I'm using VB.net (standard) 2003... and I can't even see where I can even
start a Service app... Hmmmm....

Regards,

Mr. B

Jul 21 '05 #7
Acknowledged, thanks.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Mike Burton" <li********@hot mail.com> wrote in message
news:3c******** *************** ***@posting.goo gle.com...
This may be true in terms of project templates, but P/Invoke should
expose the Windows Services API as it always did. You basically just
need to create an executable and register it with the service manager,
which is explained (in C++) here:

http://www.gamedev.net/reference/art...rticle1899.asp

The code presented shouldn't be hard to translate to C# and P/Invoke.

The only complication I can see is that you'll probably have to write
your own message pump, old-school. This is annoying, but I don't
think it should be a deal-breaker. All the same, it's probably
cheaper and easier to simply upgrade to Professional.

Thanks,
Mike Burton
DPSI

"One Handed Man \( OHM - Terry Burns \)" <news.microsoft .com> wrote in

message news:<u$******* *******@TK2MSFT NGP10.phx.gbl>. ..
You can't create a service with the standard edition (AFAIK) , you will need to u/g to professional.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Mr. B" <Us**@NoWhere.c om> wrote in message
news:65******** *************** *********@4ax.c om...
With Deft Fingers, "Chris Smith" <us**@email.com > wrote:

>Sounds like a service to me.
>I have created many services with much success.

But that's it... I don't know how to make a service (let alone where to
begin)
(:

I've an existing app... am I going to have to re-write it?

>logic. And if you are using vb.net to create your service, the

windows >service template works just fine, but you will have to add an installer
I'm using VB.net (standard) 2003... and I can't even see where I can even start a Service app... Hmmmm....

Regards,

Mr. B

Jul 21 '05 #8
With Deft Fingers, "One Handed Man \( OHM - Terry Burns \)"
<news.microsoft .com> wrote:
You can't create a service with the standard edition (AFAIK) , you will need
to u/g to professional.


UgH (upgrade) (:

Pro is way too rich for my week end programming needs (I don't do this
professionally. ..). Oh well.. thanks!

Bruce
Jul 21 '05 #9
With Deft Fingers, "Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com>
wrote:
you can create a service by creating a regular Windows Application, deleting
the Form1 created. Add a new class to your project, have it inherit from
System.Service Process.Service Base, set the project's Startup object to this


Thanks... as I don't write in a professional mode (week end programmer for
'fun')... PRO is a bit much for my needs. But I'll take a look at your
articles. Either way, it's of help. Thanks!

Bruce
Jul 21 '05 #10

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

Similar topics

0
3170
by: Jacob Callcut | last post by:
To All, When creating a Windows Service and selecting the "Add Installer" option from the right-click menu in the service's design window, a "ServiceProcessInstaller" and "ServiceInstaller" are automatically created. Does anyone know if there is a way to customize what "Add Installer" does? Specifically, I want to customize some of the code that gets added to the "ServiceInstaller" without having to cut and paste anytime I create a...
3
1636
by: Claire | last post by:
Sorry for such a daft question. Ive been following some tutorials on creating windows services. Ive not done them before. In my original debuggable windows form application, I create my worker classes. The classes 'run' themselves using several threads and only stop when the form is closed. Now I've used these worker classes in the service application. When I try to run my service manually, I am given a message that the service stopped...
14
2403
by: RDI | last post by:
I'm in the process of wiritng a custom AutoResponder that will run on a spare PC. If I don't write it as an actual "Service" but just a program that starts via the startup folder, will that use any more (or less) resources than doing it as a Service? Is it worth the extra effort to do it as a service? --
11
1157
by: Mr. B | last post by:
I've an application in which I use to check out the date/time stamp of a data base... and if I find that it has been updated, my application runs and does a particular update. Currently I fire off my application hourly useing the built in XP Scheduler. What I am going to do is to have my application check every minute while it is running as I don't want to have to wait up to a hour for my particular update to happen....
11
8320
by: jjw92 | last post by:
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in turn is called by another application). This all works fine in my development environment. Test environment: Windows Server 2003, ASP 6.0, .NET 2.0, Anonymous authentication is enabled. All components (web service, DLL, and calling application)...
0
1723
by: Ken | last post by:
Hello- I am following this article to publish a Crystal Report, inside a VS.Net project, as a web service - http://msdn2.microsoft.com/en-us/library/aa288396(VS.71).aspx When I right click on the Crystal report I find that the "Publish as Web Service" option is missing. Do I need to install a VS.Net component to make this option available? Any clues on other ways to generate the asmx file to create a publish the crystal report as a web...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8489
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
8594
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7307
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...
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...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
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.

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.