(PUP-2987) Windows service runinterval parsing

 - Refactor parsing code to a separate method to cleanup run loop
(PUP-2987) Windows service hangs WIP