regularly checking for updates with AutomaticUpdater in windows service

I have a console app/windows service leveraging the open source project, Topshelf (http://topshelf-project.com/). If you're not familiar, it lets you build your Windows Service as a Console Application, and after compiling, run it as either a console application by calling something like ('myapplication.exe') or have it run as a windows service by passing in a command line flag (like 'myapplication.exe install').

I've been following the walkthrough for using the AutomaticUpdater.dll for silent updates in a windows service (http://wyday.com/wybuild/help/automatic-updates/windows-services-console-apps.php), and I'm stumped when I get to the part where it calls the 'CheckEvery10Days()' method to check for updates. There's a comment that says, "Note: Also, since this will be a service you should call 'CheckEvery10Days()' from another thread (rather than just at startup)"

I'd like to see a code snippet for how this might look. I'm trying to use the Microsoft Task Parallel Library (see https://msdn.microsoft.com/en-us/library/dd537609(v=vs.110).aspx) for running a few indefinitely running operations.

Hi jsoper,

Right - the walkthrough example you mention only shows one call to CheckEvery10Days() on startup. The comment you mention is reminding you to call it periodically from elsewhere in your service, otherwise your service would only check for updates when cycling the service or on reboot.

You could use a timer on an interval of your choosing. If you implement something you're pleased with, feel free to share the code here!