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

Delayed job does not run on right time

Env: Mysql
I am using the hangfire. 1.7.4. I have a job delay 1min. but the job run on 30 seconds. In most of the cases the delay time is not run on right time ,how can i resolve this?

Can you provide the cron expression that you’re using?

Can you provide your “startup” class (without confidential information)?

Can you attach a screenshot showing that the job run every 30 seconds?

My first guess is that you queue polling interval is set at like 1 min or 30 seconds so your recurring job is not getting picked up right when it is placed in the queue.

Ok, Many thanks for your prompt response, See image below


Expect your reply

Are your servers off by one minute? (if you are using multiple servers)

Also, Are you running a lot of jobs? (This could also explain why every jobs are delayed (since the server can’t keep up with the number of jobs))

this Test I have only one Server. multiple servers what will happen? production environment we will use multiple servers for high-availability, What’s important about multiple servers?

I have only run two jobs ,but workcount set 20, so job can’t concurrent execution?

For the multiple servers, i was just asking could it would’ve made sense if your “worker server” would’ve been 1 minute off (1 minute in the past) your job would’ve probably been delayed.

Your supposed to be able to run job concurrently, I was just asking because if you would’ve had a lot of job running (like 1000) it could’ve delayed your job more than you wanted.

I’m really out of ideas here, I haven’t worked a lot with delayed job so i probably can’t help you more than that.