Pause job processing on non-working days


#1

I am wondering if it’s possible to pause a queued job when the current day is a non-working day (like the weekend) like wait for it being processed until a specific day. Is this possible?

Do I need to write a custom job filter attribute for this? If so, how would this work?


#2

You can have your job do it. If it is not weekday it will queue one for weekday and return otherwise continue processing.

Also have you consider using scheduled jobs?


#3

Use a CRON expression to specify the days of the week.

https://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html