Using a windows service for the server, where do jobs get scheduled

Trying to understand the architecture options of using a windows service instead of running everything in a web app.
If I have a web app that also includes the hangfire server, and want to move the server into a windows service, where would the jobs get scheduled? In the web app still?

Currently my .net core web app defines and schedules a few jobs in the Startup, but it also starts up the hangfire server. If I was to create a windows service that starts up a hangfire server, would I still schedule a recurring job via the web app Startup, or would I do that within the windows service as well?

Its working as is with the web app running both server and client, but I need to move the server into a new process that wont go to sleep.

If the Job methods are in a class library, how will the hangfire server execute them?

My setup looks like this regarding the web app

My web app

1 Like