Applet needs to poll for existence of a directory, say, every 1-4 hours, and send a couple emails/NET SENDs if it is not found. Not sure on exact interval yet, but it will definitely not be shorter than 1 hour. The overall "job" will be permanent and continuously-running for the foreseeable future. Applet will be running on a Win2k3 Server, and based on (extremely light) user usage patterns, I doubt it will interfere in any noticeable way with primary server functions, but just want it to be well-behaved, of course! Considered implementing it as a Win Service eventually, but for various reasons, first implementation will be as a console app.
Seeking the implementation that will be leanest in terms of system resource use, specifically CPU and RAM. Concerned most about the timing/polling implementation vs. CPU usage. There will not be a ton of objects, GUI, etc. created, so RAM usage should not be much of an issue, but do I need to give special consideration to Garbage Collection if I do implement it as a long-running .exe (in the months/years sense)?
FileSystemWatcher?
System.Timers.Timer?
Thread.Sleep?
other?
Actually, as I write this, it occurs that the simplest implementation -- from the standpoint of reusing the many existing "wheels" already invented for this type of task -- will be to not poll at all, but simply design it to start, perform actions, and close, and let Windows Scheduled Tasks infrastructure handle the timing aspect. But I posted anyway to get validation of that idea + general info for future reference. TY!