Note that there are some explanatory texts on larger screens.

plurals
  1. PO(Win/C#/.Net) Applet needs to poll at hourly interval - recommendations on best method?
    primarykey
    data
    text
    <p>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.</p> <p>Seeking the implementation that will be leanest in terms of system resource use, specifically CPU and RAM. <b>Concerned most about the timing/polling implementation vs. CPU usage.</b> 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)?</p> <p>FileSystemWatcher?<br> System.Timers.Timer?<br> Thread.Sleep?<br> other?</p> <p>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!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload