Alarm services in c#,
Hi Team,I need a scheduler kind of service to implement in c#. I have used hangfire and deployed in iis. but once it goes to idle state , it wont run until a request is made to the app.
so can we make use of OS services like alarm service in c# which should trigger an event irrespective whether the app is in idle state or not .
6 Replies
Sounds like IIS is your problem to be honest
Why not just deploy using kestrel and not having issues with your app going idle in the first place?
Got it. Ours is full fledged web appliation . Actually I have included hangfire in the same app. Should I seperate it out and use kestral or can i deploy the complete app in kestral? @Pobiega
You could certainly deploy the entire thing using Kestrel and a reverse proxy - thats the "standard" way of hosting modern .NET webapps
Extracting out hangfire could work, but that would mean it would run as a separate process and thus not be able to access certain parts of your application - this might be a big or a non-issue, depending on your app.
@Pobiega got it . thanks ..will check Kestral then 👍
could try to change the iis application pool start mode to always running instead of on demand
That sounds like a much easier fix. Give that a try @Shiv