title: python waitress as a windows service
body: <p>I wrote an API server using waitress and falcon on windows. It's working great but now I need to run it as service so it monitorable. What's the best way to do this? I've looked at pywin32 and <a href="http://tools.cherrypy.org/wiki/WindowsService" rel="nofollow noreferrer">cherrypy's own implementation</a>. I get stumped on on stopping waitress via python. I know ctrl-break is used when using the cmd but not sure what to use when using python.</p>
  
  <pre><code>def SvcStop(self):
      self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
      cherrypy.server.stop()
      win32event.SetEvent(self.stop_event)
  </code></pre>
  
  <p>I don't see waitress having a stop function like cherrypy.</p>
  
  <p>Any help would be great. Even if it is outside of pywin32. Just need some details on how get waitress running as a service on windows as there are lots of ways to do it and I'm unsure which is recommended.</p>
  
  <p>Thanks,
  Anthony</p>