Is it possible to schedule some queries not for specific times but to run when sql server is not busy?

Is there any way to calculate the business of the sql server?

  • You can schedule a job, then click schedule, then in the schedule type, you can choose start whenever the CPU becomes idle – Racer SQL Dec 22 '16 at 16:07
  • 3
    I would refrain from trying to figure out when Sql Server is not busy because - right this second, it's not busy, but in 2 seconds there might be a huge amount of activity. I think you'd be better off identifying a specific time when you 'know' there would be little activity. – Scott Hodgin Dec 22 '16 at 16:10
  • For what its worth, I had to restart the SQL Agent to make the Idle Condition take effect and to disable it. – Kevin3NF Dec 22 '16 at 17:52

yes you can.

You can create a job with the query or procedure you want to run.

On Schedule you can set it to run Whenever the CPU becomes idle.

enter image description here

Here you can find how to configure the CPUs idle limit.

| improve this answer | |

An Idle condition is defined at the SQL Agent properties, Advanced


The select it in the schedule type for the job as Rafael said in his comment

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.