From: Andrea Caldarone on 2 Mar 2010 04:15 Hi all, I have SQL Server Agent and under it I've some jobs that runs with a definde schedule (they can run at the same time). SQL Server Agente doesn't belongs to SQL Server Express edition, so I'm lookig for a way to build a such schema with a .net windows service. Let's say I need 10 jobs: 1) it is better to have 10 windows services? 2) it is better to have 1 windows services with 10 threads? in the first case, I need to have 10 different project that installs 10 different services with 10 different name (it is correct?) in the secound case, how can I tell the service (from the outside) to start/stop a single thread? I need to use remoting... Any suggestions are well accepted.
From: Harry Strybos on 2 Mar 2010 16:00 "Andrea Caldarone" <fakeandrea.caldarone(a)poste.it> wrote in message news:66A67844-FDCA-40CF-977E-ED75F7EA3FDA(a)microsoft.com... > Hi all, > > I have SQL Server Agent and under it I've some jobs that runs with a > definde schedule (they can run at the same time). > SQL Server Agente doesn't belongs to SQL Server Express edition, so I'm > lookig for a way to build a such schema with a .net windows service. > Let's say I need 10 jobs: > > 1) it is better to have 10 windows services? > 2) it is better to have 1 windows services with 10 threads? > > in the first case, I need to have 10 different project that installs 10 > different services with 10 different name (it is correct?) > in the secound case, how can I tell the service (from the outside) to > start/stop a single thread? I need to use remoting... > > Any suggestions are well accepted. I believe it would be much better to have a single service. A windows service must contain at least a single thread. The OnStart Method of a service lets you call to a Method (via AddressOf). From there you can decide how to handle the 10 jobs
From: kevinp on 2 Mar 2010 18:46 On Tue, 2 Mar 2010 10:15:17 +0100, "Andrea Caldarone" <fakeandrea.caldarone(a)poste.it> wrote: >Hi all, > >I have SQL Server Agent and under it I've some jobs that runs with a definde >schedule (they can run at the same time). >SQL Server Agente doesn't belongs to SQL Server Express edition, so I'm >lookig for a way to build a such schema with a .net windows service. >Let's say I need 10 jobs: > >1) it is better to have 10 windows services? >2) it is better to have 1 windows services with 10 threads? > >in the first case, I need to have 10 different project that installs 10 >different services with 10 different name (it is correct?) >in the secound case, how can I tell the service (from the outside) to >start/stop a single thread? I need to use remoting... > >Any suggestions are well accepted. Take a look at this: http://www.fmsinc.com/freE/NewTips/SQL/SQLServerExpressDatabase/Automated_Backup.asp
From: Mr. Arnold on 2 Mar 2010 20:20 Andrea Caldarone wrote: > Hi all, > > I have SQL Server Agent and under it I've some jobs that runs with a > definde schedule (they can run at the same time). > SQL Server Agente doesn't belongs to SQL Server Express edition, so I'm > lookig for a way to build a such schema with a .net windows service. > Let's say I need 10 jobs: > > 1) it is better to have 10 windows services? > 2) it is better to have 1 windows services with 10 threads? You should have one service that has 10 threads. > > in the first case, I need to have 10 different project that installs 10 > different services with 10 different name (it is correct?) Yeah, but you should have 10 threads on timers that go to sleep on different intervals. > in the secound case, how can I tell the service (from the outside) to > start/stop a single thread? I need to use remoting... No you don't need remoting. You can have a Windows form application in contact with the Windows service application, sending custom commands to the service. <http://arcanecode.com/2007/05/30/windows-services-in-c-sending-commands-to-your-windows-service-part-7/> You should be able to find VB examples.
From: Saga on 3 Mar 2010 10:24
> The OnStart Method of a service lets you call to a Method (via AddressOf). Can you provide a reference where this topic can be researched further. I have not found any information about this using Google. Thanks! Saga |