How to make ASP.NET application always running on linux?

42 Views Asked by At

We have a background job that is long running and cannot be idempotent. When redhat restarts our hangfire .net core app, we lose hours of progress.

We are using following configuration.

[Unit]
Description=ABC

[Service]
WorkingDirectory=/var/www/html/ABC
ExecStart=/usr/bin/dotnet /var/www/html/ABC/XYZ.DLL
Restart=always

Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target
0

There are 0 best solutions below