v1

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-19273210655.1 KB
Background Processes

Create background process

Create a new background process from a template.

Processing mode: <small><code>async</code></small>

post/orgs/{organization}/servers/{server}/background-processes

Path parameters

organizationstring required

The organization slug

serverinteger required

The server ID

Request body

namestring required

The name of the background process.

site_idinteger

The site to associate the background process with.

commandstring required

The command to run.

user'root' | 'forge' required

The user to run the background process as.

directorystring nullable

The directory to run the background process from.

processesinteger required

The number of processes to run.

startsecsinteger

The number of seconds to wait before starting the process.

stopwaitsecsinteger

The number of seconds to wait before stopping the process.

stopsignalstring nullable

The signal to send to stop the process.

Example request

{
  "name": "Custom command runner",
  "site_id": 12345,
  "command": "php artisan custom:command",
  "user": "forge",
  "directory": "/home/forge/my-site.com/current/",
  "processes": 1,
  "startsecs": 10,
  "stopwaitsecs": 10,
  "stopsignal": "SIGTERM"
}

Response

BackgroundProcessResource