When the Service is started (or paused and resumed) it will read the Config File and start connecting to the database using the Connectstring and BaseSQL.

If a record is found (It only look at the first row, so returning a list will just waste resources) If the first field is set (not null and not an empty string) it will see it as a hit and try to start a program with the given information,

When the PreQueueSQL value is set Startprog will will try to execute that statement storing the retreived information in variables.

After the Program is queued it will call the QueueSQL statement. make sure you change the trigger value here.

When the programn is started the StartSQL command will be executed.

When the program returns 0 (Zero) the StopSQL command will be executed, if the return value is something else, the ErrorSQL will be done. Errors will also be logged in the event log.

Read the Arguments section for Examples.

Design consequences

  • Only one program will be started in one interval
  • Default set-up installs service as Local System, this user is not allowed across the network (the connect string can have other properties)
  • Setting LogFile.SizeLimit to 0 will make the logfile linear (opposed to circular) but this will cost a lot of memory in the long run. (errors are also logged in the event log)
  • Because the service is normally run without context (Local System) there will be no environment or network disks, you need to provide an adequate one for the program you call.

Gesponsorde koppelingen