Don't have Telegram yet? Try it now!
https://thinkrethink.net/2017/03/09/application-shutdown-in-asp-net-core/
Application Shutdown in ASP.NET Core with IApplicationLifetime