C
C#2mo ago
Shiv

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
Pobiega
Pobiega2mo ago
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?
Shiv
ShivOP2mo ago
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
Pobiega
Pobiega2mo ago
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.
Shiv
ShivOP2mo ago
@Pobiega got it . thanks ..will check Kestral then 👍
Sehra
Sehra2mo ago
could try to change the iis application pool start mode to always running instead of on demand
Pobiega
Pobiega2mo ago
That sounds like a much easier fix. Give that a try @Shiv

Did you find this page helpful?