Skip to main content
POST
Create background process

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

server:create-daemons

Allow members to create daemons

Path Parameters

organization
string
required

The organization slug

server
integer
required

The server ID

Body

application/json
name
string
required

The name of the background process.

Example:

"Custom command runner"

command
string
required

The command to run.

Example:

"php artisan custom:command"

user
enum<string>
required

The user to run the background process as.

Available options:
root,
forge
Example:

"forge"

processes
integer
required

The number of processes to run.

Required range: x >= 1
Example:

1

site_id
integer

The site to associate the background process with.

Example:

12345

directory
string | null

The directory to run the background process from.

Example:

"/home/forge/my-site.com/current/"

startsecs
integer

The number of seconds to wait before starting the process.

Required range: x >= 0
Example:

10

stopwaitsecs
integer

The number of seconds to wait before stopping the process.

Required range: x >= 0
Example:

10

stopsignal
string | null

The signal to send to stop the process.

Example:

"SIGTERM"

Response

BackgroundProcessResource

data
BackgroundProcessResource · object
required