cortex stop

Stop the Cortex HTTP server, background daemon processes, or both.

Usage

cortex stop                          # Stop server + daemons
cortex stop --server-only            # Stop only the HTTP server
cortex stop --daemon-only            # Stop only the daemon processes
cortex stop -p 3000                  # Stop server on a specific port

Options

OptionDescription
--port, -pPort of the server to stop (default: 3000)
--server-onlyStop only the HTTP server, keep daemons running
--daemon-onlyStop only daemon processes, keep server running
--helpShow help for this command

Process Shutdown

On stop, Cortex performs a graceful shutdown:

  1. SIGTERM sent to the target process
  2. 5-second grace period for clean shutdown
  3. SIGKILL if process hasn't exited

Examples

# Stop everything
cortex stop

# Stop only the server
cortex stop --server-only

# Stop only daemons
cortex stop --daemon-only

# Stop server on custom port
cortex stop -p 8080