I tried both System.threading.timer and system.timers.timer and none seemed
to work
And I need to restart the service programmatically.
Here is the thing.
My program creates importfiles for another system. These files can have
multiple levels that has to be imported from the lowest level to the
highest. Therefore my program creates these imports and add them to a
database for temporary storage.
Another program then looks at the priority and dumps these files to a folder
where yet another program finds these files and imports them.
Problem is that this last step uses a little dodgy service that sometime
loses the connection to the importprogram, or rather the other way round.
Any who. The solution Is to restart the service so the connection goes up
again.
So when the middle program detects that there is imports cued in DB and a
already bumped importfile has not been touched for some time this should
restart the service
/Tomas
"Tom Shelton" <to*********@comcastXXXXXXX.netskrev i meddelandet
news:<f6******************************@comcast.com >...
On 2008-06-27, Tomas Andersson <to*************@heatex.comwrote:
I have two questions regarding services.
First of.
Is there any problem with creating VB9 services running timer events
om Winxp?
I built a service App and it installs and runs but the timer events
doesn´t klick.
>
What timer? System.Windows.Forms.Timer does NOT work in services.
You need to be using System.Threading.Timer or System.Timers.Timer.
>
Lastly, how do I logon to another computer Win2003 Server and
restart / check status of a service.
>
In what context? Programatically? As a user?
>
--
Tom Shelton