Function

SMJobSubmit

Submits the given job to the specified domain.

Declaration

macOS
Boolean SMJobSubmit(CFStringRef domain, CFDictionaryRef job, AuthorizationRef auth, CFErrorRef *outError);
Mac Catalyst
Boolean SMJobSubmit(CFStringRef domain, CFDictionaryRef job, void *auth, CFErrorRef *outError);

Parameters

domain

The job's domain (e.g. kSMDomainSystemLaunchd).

job

A dictionary describing a job.

auth

An AuthorizationRef containing the kSMRightModifySystemDaemons right if the given domain is kSMDomainSystemLaunchd.

outError

An output reference to a CFErrorRef describing the specific error encountered while submitting the job dictionary, or NULL if no error occurred. It is the responsibility of the application to release the error reference. This argument may be NULL.

Return Value

true if the job was submitted successfully, otherwise false.

Discussion

SMJobSubmit submits the given job to the specified domain.

See Also

Examining Jobs

SMCopyAllJobDictionaries

Copy the job description dictionaries for all jobs in the given domain.

Deprecated
SMJobCopyDictionary

Copy the job description dictionary for the given job label.

Deprecated
SMJobRemove

Removes the job with the given label from the specified domain.

Deprecated