Check automatic command restarts

Use a command that prints its process ID, waits eight seconds, and exits successfully. You can check automatic restart and manual stop behavior without starting an application server or coding agent.

You need PHP available in the project's shell environment.

Add a demo project

Create an empty directory and save this solo.yml inside it:

name: Restart demo
processes:
Heartbeat:
command: php -r 'printf("Started PID %d\n", getmypid()); sleep(8);'
auto_start: false
auto_restart: true

Add the directory as a project in Solo. Review and trust the imported command.

Check the successful exit

Start Heartbeat from the sidebar. Its output shows Started PID followed by a number.

After eight seconds, PHP exits with status zero. Solo starts the command again because auto_restart is enabled. Check the output for another Started PID line with a different number.

The new process ID confirms that Solo started another process. Automatic restart applies to successful self-exits as well as crashes.

Check an explicit stop

While Heartbeat runs, click Stop. Wait more than eight seconds.

The command stays stopped and no new Started PID line appears. An explicit stop disables the current run's automatic restart.

Click Start to run the command again. Its configured automatic restart behavior still applies.

Remove the demo

Stop Heartbeat before removing the project from Solo. You can then delete the demo directory.

See Auto-restart for the restart rate limit. For a worker that restarts when application files change, use the Laravel dev stack guide.

Are you an agent? Read this doc via API: /api/v1/docs/workflows/check-command-restarts