2

Recently I am trying to figure out how to run a dotnet service after my MacOS startup.

On Windows, I can install the NSSM to run the script as a service. This script will be triggered whenever my computer starts up.

Inside the script contains the line of code like dotnet RunMyService

Am I allow to perform the same action in MacOS as well?

  • Why use .NET on macOS? – JMY1000 Jan 15 '18 at 6:47
  • @JMY1000, there is a script I created by using .NET. I need to run this script before I can continue my work on MacOS. – WeeHong Jan 15 '18 at 8:10
  • I'm a little confused to be honest, since Windows Services don't exist on macOS for obvious reasons. There's other parallels, but I'm not sure if they'd fit the purpose. What does you script do? Is the source available somewhere? – JMY1000 Jan 15 '18 at 8:25
  • @JMY1000 the source only on my computer. I need to run dotnet RunMyService every single time before I start my projects. So I am thinking is there a way to run my scripts after startup. – WeeHong Jan 15 '18 at 8:38
  • Have you taken a look at create a launchd service? Also, could you maybe create a Gist with the source? – JMY1000 Jan 15 '18 at 8:44

You must log in to answer this question.

Browse other questions tagged .