locked
SQL Agent Job Schedules Getting Skipped RRS feed

  • Question

  • Hi All,

    Recently on Production Server, we observed some of the Job Schedules are getting skipped. I mean, jobs are not running as per scheduled. Can anyone tell what could be the reasons ??This is the first time we are seeing this in our environment.

    We are running SQL Server 2012 sp1. We ruled out SQL was running, SQL Agent was running fine also it wasn't long running jobs. Job is scheduled every day midnight at 12:00 am and it takes an 1 hour to complete. Very difficult to troubleshoot this. 

    Can anyone provide their inputs on this?

    Thanks,

    Sam

    Thursday, March 24, 2016 10:22 AM

Answers

  • Usually job takes an hour to get completed and job schedule daily once. so no chance to say its a long running job.

    It is pretty clear from the SQL job history, it skipped the schedule.

    Got this Link from search from Aaron Bertrand

    http://dba.stackexchange.com/questions/31775/reset-force-sql-agent-next-run-date

    • Proposed as answer by Gregor Stefka Wednesday, March 30, 2016 9:36 AM
    • Unproposed as answer by Gregor Stefka Wednesday, March 30, 2016 9:36 AM
    • Proposed as answer by Gregor Stefka Wednesday, March 30, 2016 9:36 AM
    • Marked as answer by Charlie Liao Friday, April 8, 2016 5:59 AM
    Thursday, March 24, 2016 5:27 PM

All replies

  • Hi All,

    Recently on Production Server, we observed some of the Job Schedules are getting skipped. I mean, jobs are not running as per scheduled. Can anyone tell what could be the reasons ??This is the first time we are seeing this in our environment.

    We are running SQL Server 2012 sp1. We ruled out SQL was running, SQL Agent was running fine also it wasn't long running jobs. Job is scheduled every day midnight at 12:00 am and it takes an 1 hour to complete. Very difficult to troubleshoot this.

    I have not seen SQL Server missing schedules in SQL Server 2012 any actions you performed on windows server. Did you looked ta net running schedule ?

    How are you so sure it missed the schedule, are you sure windows server time was not changed


    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 Wiki Articles

    MVP

    Thursday, March 24, 2016 10:40 AM
  • Could you please check total duration of the Job before it was skipped, if it exceed the next run time,  I think it is expected behavoir 

    there could be many reasons that job may run more than the usual time

    https://blogs.msdn.microsoft.com/poojakamath/2014/02/20/sql-agent-skipping-scheduled-job-runs-but-the-job-history-does-not-reveal-anything/


    Thanks Saravana Kumar C

    Thursday, March 24, 2016 11:13 AM
  • Based on My experience this happens when the SQL Agent (or Server) crashes during the execution of the Job. 

    After that happened, SQLAgent may skip the next scheduled run. How to work around that? --> Just start the Job by hand once and the SQLAgent seems to "reset" the information about the scheduled job (maybe somewhere in the MSDB Database). 

    Please note that i ve seen this "skipping SQLAgent schedules without any messages or errors" ONLY after a hard Crash (taskkill, GPF, BSOD or similar). To really get this solved, find the root cause of the crashes and fix em.

    --

    Businessprocessautomation with the EWS SQL Interface SQLExchangeSync

    Thursday, March 24, 2016 11:24 AM
  • Gregor,

    I case of hard crash we will see error in errorlog or some dump but that is not OP's case what Saravana suggested seems more logical.

    The point here is SQL agent cannot skip schedule unless

    1. The job is still running when next run date time has occurred

    2. Somebody played with system date


    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 Wiki Articles

    MVP

    Thursday, March 24, 2016 12:09 PM
  • What exactly are you observing.  What makes you think it is not running "as scheduled"?

    The most common reason it would not run is because the job was already running at the next runtime. 

    I would not schedule things at exactly 12:00am.  Usually there is clock maintenance and other maintenance at 12:00am. I would suggest running at 12:15am or some offset time.

    Thursday, March 24, 2016 1:16 PM
  • Usually job takes an hour to get completed and job schedule daily once. so no chance to say its a long running job.

    It is pretty clear from the SQL job history, it skipped the schedule.

    Got this Link from search from Aaron Bertrand

    http://dba.stackexchange.com/questions/31775/reset-force-sql-agent-next-run-date

    • Proposed as answer by Gregor Stefka Wednesday, March 30, 2016 9:36 AM
    • Unproposed as answer by Gregor Stefka Wednesday, March 30, 2016 9:36 AM
    • Proposed as answer by Gregor Stefka Wednesday, March 30, 2016 9:36 AM
    • Marked as answer by Charlie Liao Friday, April 8, 2016 5:59 AM
    Thursday, March 24, 2016 5:27 PM