8.8. CRATE Windows service

The most convenient way of running the CRATE web site is via a Windows service. The service starts both the CRATE internal web server (via CherryPy) and the CRATE task queue system (via Celery). It’s the equivalent of running both crate_launch_cherrypy_server and crate_launch_celery together.

To create a Windows service for CRATE, use the crate_windows_service command. You will need to run it from a command prompt with Administrator authority.

Logs from the CRATE processes (Celery, CherryPy/Django) go to the normal disk logs. However, output from the service itself goes to the Windows logs: see Event Viewer ‣ Windows Logs ‣ Application.

8.8.1. crate_windows_service


usage: 'crate_windows_service-script.py [options] install|update|remove|start [...]|stop|restart [...]|debug [...]'
Options for 'install' and 'update' commands only:
 --username domain\username : The Username the service is to run under
 --password password : The password for the username
 --startup [manual|auto|disabled|delayed] : How the service starts, default = manual
 --interactive : Allow the service to interact with the desktop.
 --perfmonini file: .ini file to use for registering performance monitor data
 --perfmondll file: .dll file to use when querying the service for
   performance data, default = perfmondata.dll
Options for 'start' and 'stop' commands only:
 --wait seconds: Wait for the service to actually start or stop.
                 If you specify --wait with the 'stop' option, the service
                 and all dependent services will be stopped, each waiting
                 the specified period.

# The ‘debug’ option runs a service in debugging mode so you can see what it’s doing.