nssm set test Start SERVICE_AUTO_START 开机启动类型分别为 SERVICE_AUTO_START: 开机自启 SERVICE_DELAYED_AUTO_START: 开机延迟自启 SERVICE_DEMAND_START: 手动启动 SERVICE_DISABLED: 服务器不可用 Log on 运行账户,windows服务很少改这个 命令行形式 nssm set UT2003 ObjectName LocalSystem nssm set UT2003 ...
nssm set caddy Start SERVICE_DELAYED_AUTO_STARTnssm start caddy 参数说明 DisplayName: 服务显示名称 Description: 服务描述 AppDirectory: 启动目录 AppStdout 和AppStderr: 标准输出和错误输出 AppNoConsole: 是否显示 Console 设置为 1 不显示 Start: 设置启动方式 可选下列值 SERVICE_AUTO_START 开机自...
nssm set <servicename> DisplayName <displayname>nssm set <servicename> Description <description>nssm set <servicename> Start SERVICE_AUTO_START 启动模式清单: SERVICE_AUTO_START:Automatic 自动. SERVICE_DELAYED_AUTO_START:Delayed 自动(延时启动). SERVICE_DEMAND_START:Manual 手动. SERVICE_DISABLED:禁用...
const TCHAR *startup_strings[] = { _T("SERVICE_AUTO_START"), _T("SERVICE_DELAYED_AUTO_START"), _T("SERVICE_DEMAND_START"), _T("SERVICE_DISABLED"), 0 }; const TCHAR *priority_strings[] = { _T("REALTIME_PRIORITY_CLASS"), _T("HIGH_PRIORITY_CLASS"), _T("ABOVE_NORMAL_PRIORITY...
NSSM will pause an increasingly longer time between subsequent restart attempts if the service fails to start in a timely manner, up to a maximum of four minutes. This is so it does not consume an excessive amount of CPU time trying to start a failed application over and over again. If ...
NSSM will pause an increasingly longer time between subsequent restart attempts if the service fails to start in a timely manner, up to a maximum of four minutes. This is so it does not consume an excessive amount of CPU time trying to start a failed application over and over again. If ...
If, for instance, you configured a restart delay of 3000 milliseconds and the service failed on each startup, the first restart attempt would be delayed by 3000 milliseconds because 3000ms configured is longer than 0ms from throttling. The second attempt would also be delayed by 3000 ...
nssm reset <servicename> <parameter> [] To show service removal GUI: nssm remove [<servicename>] To remove a service without confirmation: nssm remove <servicename> confirm To manage a service: nssm start <servicename> nssm stop <servicename> nssm restart <servicename> nssm st...
从版本 2.11 开始,nssm 遵循 srvany 支持的 AppEnvironment 注册表值。要指定要传递到受监视应用程序的环境变量列表,请创建一个多值字符串 (REG_MULTI_SZ) 值 HKLM\System\CurrentControlSet\Services\servicename\Parameters\AppEnvironment,其中每个条目的格式为 KEY=VALUE。
SERVICE_AUTO_START: Automatic startup at boot. SERVICE_DELAYED_START: Delayed startup at boot. SERVICE_DEMAND_START: Manual service startup. SERVICE_DISABLED: The service is disabled. Note that SERVICE_DELAYED_START is not supported on versions of Windows prior to Vista. NSSM will set the ser...