I have created a Worker Service with .Net 6, I have published it via folder profile for Mac OS, Now in Windows I can create a service using SC CREATE
, how do I achieve the same on Mac OS.
I have tried launchd
but nothing happens no error or any log.
This is my plist file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.NYC.DOB</string>
<key>ServiceDescription</key>
<string>NYC DOB</string>
<key>ProgramArguments</key>
<array>
<string>Applications/DOB/NYC</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>out.log</string>
<key>StandardErrorPath</key>
<string>error.log</string>
</dict>
</plist>
And I have used the following commands to run the service
sudo launchctl load /Applications/DOB/org.NYC.DOB.plist
sudo launchctl start org.NYC.DOB
Commands are executed successfully but nothing happens.