Answers for "how to create a worker service"

1

how to create a worker service

//Step 1: Publish the Worker service

cd "Path to the Worker service project"
dotnet restore
dotnet publish -o PathToThePublishFolder

//Step 2: Deploy and start with sc utility

sc.exe create DemoWorker binpath= PathToThePublishFolder\YourWorkerClassName.exe
sc.exe start YourWorkerClassName

//Step 3: Stop and delete with sc utility

sc.exe stop YourWorkerClassName 
sc.exe delete YourWorkerClassName
Posted by: Guest on March-25-2022

Code answers related to "how to create a worker service"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language