Global Launch Daemons launchd

Save the file here:
/Library/LaunchDaemons/examplelaunchd.plist

set root permission:
sudo chown root /Library/LaunchDaemons/examplelaunchd.plist

sudo launchctl load -w /Library/LaunchDaemons/examplelaunchd.plist

You can stop the service using the unload subcommand.
sudo launchctl unload /Library/LaunchDaemons/examplelaunchd.plist

sudo launchctl list

Link:
https://serverfault.com/questions/194832/how-to-start-stop-restart-launchd-services-from-the-command-line