We left Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Is it possible to throttle worker count based on time of day?

In our environment, Hangfire runs and processes import files in the background. This works great - and we have our import files scheduled to run during off-peak hours. Perfect.

Today (and occasionally before) - we have had one or two customers drop their nightly batches into Hangfire - and it is causing extreme strain on our database - during our high use production time.

Is there any way to either throttle the number of worker processes are available to a process (12 overnight, 4 during the day) - or, is there a way to have an instance ignore jobs during a certain time frame?

Thanks

You would do this as part of the job. The first part of the job would be to determine if it is “off hours.” If it is not off hours, do not proceed with the job (file import).

Alternatively, you could have a third party system stop the service at a designated time and start the service at a designated time.