Skip to content

Commit 9a66188

Browse files
committed
[add] scheduler based project install script for NSSM
1 parent 82b2b22 commit 9a66188

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Parameters
2+
3+
$appName = "MyProject.Scheduler"
4+
$appPath = $PSScriptRoot
5+
$exepath = $appPath + "\" + $appName + ".exe"
6+
$description = "MyProject.Scheduler service"
7+
$stopTimeout = 150000 # 5 minutes
8+
$logonUser = "LocalService"
9+
10+
# Installation execution
11+
12+
nssm install $appName $exepath
13+
nssm set $appName AppDirectory $appPath
14+
nssm set $appName DisplayName $description
15+
nssm set $appName Description $description
16+
nssm set $appName ObjectName $logonUser
17+
nssm set $appName AppStopMethodConsole $stopTimeout
18+
nssm set $appName AppExit Default Exit
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Documentation
2+
3+
This project is based on `Simplify.Scheduler` Framework.
4+
5+
[Documentation](https://github.com/SimplifyNet/Simplify/wiki/Simplify.Scheduler)
6+
7+
To register it as windows service use Install.ps1 script for [NSSM](https://nssm.cc/)

0 commit comments

Comments
 (0)