From: Robert L. <bob...@gm...> - 2012-11-14 08:08:35
|
Hello Cristiano, On Tue, Nov 13, 2012 at 12:26 PM, Cristiano Sumariva <sum...@gm...> wrote: > Maybe is trying to say that he needs only one instance running. Yes, I need only one running instance. At any given time there may be only one instance running. > Inter Process Communication? None necessary. No interaction with any other system/process at all. No listening on sockets and stuff (maybe my wording "daemon" is a bit high-fetched for such a program). Just periodically checking stuff on the file system and writing the result out on a protocol file. > Your application will write files, so can not you write a pid file? Yes I can. My current testing version simply runs out of an infinite loop in a batch file. This does the job 100% but bears the risk that somebody accidentally closes that console window, stopping the process. This is why I looked for a more "invisible" solution. Background info: This program is a supervisor which ensures the integrity of so called "recipe files" on a computer that controls an industrial production equipment. The equipment is operated 24/7. Two possible failure scenarios: - The supervisor program compromises the computer and somehow endangers the production process BAD BAD BAD! - The supervisor program just stops working (because, for instance, somebody closes the apparently useless console window). Then the factory automation system will deny the start of the next production run due to an out-of-date integrity protocol file. This happens on a Friday afternoon, you can imagine how happy everybody will be. Maybe I can do something with the Windows "Scheduled Tasks" thing. Need to find out the finest "granularity" of time periods it can do. I'm aiming for one run every minute. Thanks, robert |