Net Core教程

.net core window与linux服务自启动

本文主要是介绍.net core window与linux服务自启动,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

//根据操作系统处理启动方式
//How to run a .NET Core console app as a service using Systemd on Linux
//https://swimburger.net/blog/dotnet/how-to-run-a-dotnet-core-console-app-as-a-service-using-systemd-on-linux
//https://csharp.christiannagel.com/2019/10/15/windowsservice/

 

sc create “Devcat Service” binPath=D:\devcat\DevCat.exe
sc query “Devcat Service”
sc start “Devcat Service”
sc stop“Devcat Service”
sc delete“Devcat Service”

这篇关于.net core window与linux服务自启动的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!