Background Service

The background service is a standard Windows service.  It self installs and uninstalls using the standard mechanisms. 

The Start/Stop control command structure has been modified with a custom command to allow the website to kick the background service.  This kick message is sent whenever the workstation needs to manually start a job.  

To keep the code simple and minimize the number of thread synchronization techniques, the scheduler sits in a sleep loop waking up periodically to see if it has any work or whether it needs to shutdown.  Basic Win32 coding.

The class TaskInfo stores information about each of the different tasks as well as starting, stopping and loading the appropriate DLL, when needed.  All tasks are run on separate threads.  Again, to keep it simple, we’re assuming that customers are not scheduling all of their tasks for midnight as we will run all of them at the time that they are scheduled.  Caveat emptor.

All Tasks inherit from ModuleBaseClass, modeled on the standard UI class BackgroundWorker which was not available for services.

top