CLI · Winter Console

The process command

Processes can be started from more than code. The process command finds every process class in the project, shows which of them are running right now, and lets you start, stop and inspect any of them — without touching the application.

Alias call procActions list · start · stop · statusDaemons a separate command

Why

A process is a unit of work outside a request: an import, a mailing, a recalculation. It needs operational actions the application’s code does not have: see whether it is running right now, start it by hand after a failure, stop it before a deploy, work out why it is eating the CPU.

The process command gives exactly that. What processes are and how to write them is on the Processes page.

What the project has

bash
php call process list
php call proc list          # the same thing
text
[ Available Processes ]
[P] main.process.ImportProcess       ● running   [BUSY]
[P] main.process.ReportProcess       ○ stopped
[P] main.process.CleanupProcess      ● running   [idle]
- - - - - - - - - -
[i] 3 defined, 2 running.

The list is collected by scanning the project, so processes need no registration anywhere — it is enough for the class to extend Process. Daemons do not appear in this list: they have their own command.

Marker Meaning
/ Running / stopped
[BUSY] Currently doing useful work
[idle] Started but idling

The class name

The class is given in dot notation — the same way as in make and script:

bash
php call proc main.process.ImportProcess status

Dots become namespace separators and each segment is capitalised: main.process.ImportProcessMain\Process\ImportProcess. The case you type does not matter, so main.process.importprocess works too.

Starting

bash
php call proc main.process.Import              # foreground
php call proc main.process.Import start        # the same thing
php call proc main.process.Import start -d     # in the background

In the foreground — the process occupies the terminal, writes into it and finishes on its own. That is convenient for debugging: you see the output and Ctrl+C stops it.

In the background (-d) — the command detaches the process and returns control, printing the PID. The terminal can be closed.

text
[✓] Dispatched (background): MainProcessImport
  PID          48213

Starting it again does not create a second process

If the process is already running, the command says so and starts nothing:

[!] Already running [PID:48213] (2026-08-14 09:12:44).

This is the same locking mechanism that protects a process from being started concurrently from inside the application — a lock file in storage/runnable.

Stopping

bash
php call proc main.process.Import stop

A SIGTERM is sent — the graceful-shutdown signal. The process gets the chance to finish its current iteration, close its connections and exit on its own. It does not die instantly, and that is right: an unfinished write to the database is worse than a second of delay.

Status

bash
php call proc main.process.Import status
text
[ Process Status ]
main.process.Import        Process ● RUNNING
PID          48213
State        RUNNING
Activity     BUSY
Started      2026-08-14 09:12:44
Uptime       2h 14m
Concurrency  4

The -v flag adds the resource usage, taken from the operating system:

bash
php call proc main.process.Import status -v
text
[ Resources ]
User         winter
PPID         1
CPU          12.4 %
Memory       3.1 % (248.6 MB)
Elapsed      02:14:31

This is the first place to look when a process “hangs”: Activity shows whether it is working or idling, and CPU and Memory show what it ran into.

Every action

Command What it does
list Every process in the project with its current state
<Class> Start in the foreground
<Class> start The same, explicitly
<Class> start -d Start in the background
<Class> stop Graceful stop (SIGTERM)
<Class> status State, PID, uptime
<Class> status -v Plus resource usage

Next

  • Processes — how to write processes
  • daemon — the same for daemons and their workers
  • schedule — scheduled tasks
  • run — starting processes together with the application