locked
Scheduled Jobs and Server Maintenance RRS feed

  • Question

  • Hi All,

    Running SQL 2012.  We have a series of scheduled jobs that run once per day, with no retry interval set.  I was informed by IT today that they need to perform unscheduled maintenance on the server this evening - which may or may not be completed by the time our jobs are set to run.  My question is: if a job is set to run at (say) 10pm, and the server is off - when it is restarted, does it try and execute this missed job?  Or does it just do nothing and next execute according to it's regular schedule (so, at 10pm the following night?)

    Thanks.

    Tuesday, March 10, 2015 5:46 PM

Answers

  • >>does it try and execute this missed job

    It will not execute the missed job. The job fails.

    The next run is going to be as per the schedule starts from STEP1.

    --Prashanth

    Tuesday, March 10, 2015 5:50 PM

All replies

  • >>does it try and execute this missed job

    It will not execute the missed job. The job fails.

    The next run is going to be as per the schedule starts from STEP1.

    --Prashanth

    Tuesday, March 10, 2015 5:50 PM
  •  if a job is set to run at (say) 10pm, and the server is off - when it is restarted, does it try and execute this missed job?  Or does it just do nothing and next execute according to it's regular schedule (so, at 10pm the following night?)

    Thanks.

    You are correct to think: SQL Server would not execute the job if it misses its schedule that day it would run it on next schedule. Simply if schedule is missed due to server restart , it wont be executed after server comes online unless you have some logic. The next schedule will work

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Technet Wiki Article

    MVP

    Tuesday, March 10, 2015 6:01 PM
  • The job doesn't fail if SQL Server isn't started when the job is supposed to start. If SQL Server isn't started, then there is nothing tat will attempt to start the job and there's nothing to fail.

    There's no re-try here. SQL Server Agent will run the job next time (assuming it is started, of course).


    Tibor Karaszi, SQL Server MVP | web | blog

    Wednesday, March 11, 2015 12:34 PM
  • The job doesn't fail if SQL Server isn't started when the job is supposed to start. If SQL Server isn't started, then there is nothing tat will attempt to start the job and there's nothing to fail.

    There's no re-try here. SQL Server Agent will run the job next time (assuming it is started, of course).


    Tibor Karaszi, SQL Server MVP | web | blog

    Hello Tibor,

    I guess this is what Prashanth was trying to say. That if job is missed,because agent was not online, when agent comes online it wont execute it immediately but would follow normal course. Hope I am saying correct


    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

    My Technet Wiki Article

    MVP

    Wednesday, March 11, 2015 4:37 PM
  • You are correct Shanky.That is what I meant :-).

    It will not retry. Unless there is a some sort of intelligence being written to do so.

    --Prashanth

    Wednesday, March 11, 2015 4:42 PM