1

I have Quartz.Net server running as a Windows Service. I have custom job in DLL file and everything is working. Job is triggered at night, but sometimes I need to trigger this job manually from other applications running on the same machine.

How do you trigger it?

wonea
  • 4,783
  • 17
  • 86
  • 139
user5549917
  • 33
  • 1
  • 5

1 Answers1

0

I think you can create an console application based on your service and in the Main add following code :

static void Main(string[] args)
{
    TestService = new  TestService ();

    #if DEBUG
        TestService.StartWork();
    #else
        System.ServiceProcess.ServiceBase.Run(TestService ); 
    #endif
}

So you can create service based on this code and in order to trigger this job just to run this console app.

Fernando
  • 44
  • 5
  • I can't do that. It is a long-running job, probably longer then triggering application life. I need to find some way to communicate with server to trigger the job. But I can't find any examples. – user5549917 Jan 02 '16 at 11:54