MacOS-specific attributes for a System Service.
Fields
| Field Name | Description |
|---|---|
disabled - Boolean
|
Hint that this job should not be submitted when loading. Note: This does not reflect whether the job is currently running. |
groupName - String
|
Group name the job should run as. If a user is specified but a group is not, the user's default group is used. |
inetdCompatibility - InetdCompatibility
|
Indicates the daemon expects inetd-style launch behavior. |
limitLoadToHosts - [String!]
|
Apply this configuration only on the listed hostnames. |
limitLoadFromHosts - [String!]
|
Apply this configuration on all hosts except the ones listed. |
limitLoadToSessionType - [String]
|
Apply this configuration only to sessions of the specified type. |
programArguments - [String!]
|
Command-line arguments used to start the job. Required if a standalone program path is not provided. |
enableGlobbing - Boolean
|
Expand wildcard patterns in programArguments before starting. |
enableTransactions - Boolean
|
Indicates the job will mark critical work as transactions and delay termination until those transactions complete. |
onDemand - Boolean
|
Deprecated. Replaced by keepAlive. |
keepAlive - KeepAlive
|
Controls whether the job is kept running continuously or started based on conditions. Set to true to keep it always running, or provide conditions to control restarts. Multiple conditions are combined with OR logic. |
rootDirectory - String
|
Directory to change the process root to before starting. |
workingDirectory - String
|
Directory to change into before starting. |
environmentVariables - [EnvironmentVariable!]
|
Additional environment variables to set before starting. |
umask - Int
|
File-permission mask to apply before starting (use decimal values). |
timeOut - Duration
|
Recommended idle timeout to pass to the job. If not set, a default is used. |
exitTimeOut - Duration
|
How long to wait before forcefully terminating the job on exit. Default is 20 seconds. 0 means no forced termination. |
throttleInterval - Duration
|
Minimum seconds between restarts, overriding the default policy. By default, jobs are not restarted more than once every 10 seconds. |
initGroups - Boolean
|
Whether to initialize group memberships before starting. Ignored if no user is specified. |
watchPaths - [String!]
|
Start the job if any of the listed paths change. |
queueDirectories - [String!]
|
Start the job when any listed directory becomes non-empty. |
startOnMount - Boolean
|
Start the job whenever a filesystem is mounted. |
startInterval - Duration
|
Start the job every N seconds. If the system sleeps, missed intervals are coalesced and run on wake. |
startCalendarInterval - [StartCalendarInterval!]
|
Start the job at specified calendar times. Missing fields act as wildcards. If the system sleeps, missed runs are coalesced on wake. |
standardInPath - String
|
File to use for standard input. |
standardOutPath - String
|
File to use for standard output. |
standardErrorPath - String
|
File to use for standard error output. |
debug - Boolean
|
Increase logging detail while handling this job. |
waitForDebugger - Boolean
|
Wait for a debugger to attach before the job starts running. |
softResourceLimits - ServiceResourceLimit
|
Soft resource limits for the job. |
hardResourceLimits - ServiceResourceLimit
|
Hard resource limits for the job. |
nice - Int
|
Niceness value to apply to the job's process. |
processType - ServiceProcessType
|
High-level classification that influences resource limits. If unspecified, light limits are applied by default. |
abandonProcessGroup - Boolean
|
If true, do not automatically terminate other processes in the same group when this job exits. |
lowPriorityIo - Boolean
|
Treat the job as low priority for filesystem I/O. |
launchOnlyOnce - Boolean
|
If true, the job can run only once and cannot be safely respawned. |
machServices - [MachService!]
|
Services to register and advertise while the job is running. |
sockets - [ServiceSocket]
|
Socket configuration used to start the job on demand. When ready, the job receives one or more socket descriptors to accept or connect. |
Used by
SystemServicetype: A background service or daemon configured on an Endpoint.SystemServiceOsSpecificunion: OS-specific system service union type.
Example
Example
{
"disabled": false,
"groupName": "xyz789",
"inetdCompatibility": InetdCompatibility,
"limitLoadToHosts": ["abc123"],
"limitLoadFromHosts": ["abc123"],
"limitLoadToSessionType": ["xyz789"],
"programArguments": ["abc123"],
"enableGlobbing": false,
"enableTransactions": false,
"onDemand": false,
"keepAlive": KeepAlive,
"rootDirectory": "xyz789",
"workingDirectory": "xyz789",
"environmentVariables": [EnvironmentVariable],
"umask": 123,
"timeOut": "600000000",
"exitTimeOut": "600000000",
"throttleInterval": "600000000",
"initGroups": false,
"watchPaths": ["xyz789"],
"queueDirectories": ["xyz789"],
"startOnMount": false,
"startInterval": "600000000",
"startCalendarInterval": [StartCalendarInterval],
"standardInPath": "xyz789",
"standardOutPath": "xyz789",
"standardErrorPath": "abc123",
"debug": true,
"waitForDebugger": true,
"softResourceLimits": ServiceResourceLimit,
"hardResourceLimits": ServiceResourceLimit,
"nice": 987,
"processType": "BACKGROUND",
"abandonProcessGroup": false,
"lowPriorityIo": false,
"launchOnlyOnce": false,
"machServices": [MachService],
"sockets": [ServiceSocket]
}