Service Program Sample Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone have some sample code for a VB.NET Service program. I need the service program to sleep and come alive every night around midnight. The program needs to open an MDB database, update one of the tables and then go back to sleep until the next day. Can this be done with a console app or does it need to be a service? I need it to run even if the server is logged off. Will a console program run from the scheduler if the computer is logged off?
 
I did this once, but lost the code for it. However, you need to start the
service using the System account. This way it will continue to run once the
current user has logged off.

Regards - OHM
 
Just build in a timer control that checks if it's midnight
ever minute...
-----Original Message-----
Does anyone have some sample code for a VB.NET Service
program. I need the service program to sleep and come
alive every night around midnight. The program needs to
open an MDB database, update one of the tables and then go
back to sleep until the next day. Can this be done with
a console app or does it need to be a service? I need it
to run even if the server is logged off. Will a console
program run from the scheduler if the computer is logged
off?
 
Use a service and use the system account to run it, that way no one needs to
be logged on.

Regards - OHM
 
Back
Top