Missed Runs

Overview

A job that fails writes a history row, raises an alert and turns up on three other pages.

A job that does not run at all writes nothing, raises nothing and appears nowhere, which makes it the one kind of automation failure this product could not see.

Three ways it happens, all silent:

  • an Agent service that was down for six hours
  • a schedule somebody disabled while debugging
  • a job whose next run date was never recomputed
The Missed Runs page: what the schedules called for against what actually ran
The whole page over seven days. Thirty one scheduled jobs, 410 runs against 3,021 due, and 2,632 runs missed across twelve jobs.

Where to find it

Expand a server in the tree, expand the msdb database, then MSDB → Missed Runs.

Shown only on an instance that can have SQL Server Agent.


The method is to count twice

Number Where it comes from
Due Worked out from sysschedules: what the schedules say should have happened in the window.
Ran Counted from sysjobhistory: what actually did.

Both numbers are shown side by side rather than as a difference, so the reader can see where the claim comes from instead of being handed an answer.


Two schedule kinds are not counted, and saying so is the honest half of the page

Kind Why it cannot be predicted
When Agent starts There are no times to predict. Whether it fired depends on whether the service restarted.
When the instance goes idle Fires on a CPU threshold held for a period, which is an Agent Settings value rather than a clock.

Jobs on those schedules are listed with their schedule described and no expectation set against them. Inventing a number for them would put the loudest row on the page next to the least reliable arithmetic.


A job with no schedule is not a fault either

Plenty of jobs exist to be started by an alert, by another job, or by somebody at a keyboard. Those are listed too, as what they are.


Reading the chart

The bars: jobs ranked by the runs their schedules called for and the history does not hold
Twelve jobs with a gap, worst first. The line under each name is the arithmetic behind the bar: nought of 1,200 ran.

One bar per job with a gap between what its schedule implies and what the history holds, ranked by the size of that gap.

The caveat line above the bars is part of the reading. Agent started four days into this window on this instance, so anything due before that was never going to run, and the page says so rather than counting it against the job.


Reading the grid

The grid: the schedule in words, what was due, what ran and what is next
Due and Ran are shown side by side rather than as a difference. The two schedule kinds that cannot be predicted, on Agent start and on idle, get their description and no expectation set against them.
Column What it is
Job The job.
Schedule The schedule in words: every day at 02:00, every 15 minutes between 06:00 and 20:00, on Agent start, on idle, or none.
Due How many runs the schedule implies inside the window. Blank for the two kinds that cannot be predicted.
Ran How many runs the history holds.
Missed The difference, when both numbers exist.
Last run When it last ran.
Next run What Agent thinks is next. A next run date in the past is its own finding.
Verdict Whether this job is keeping up, whether its schedule is disabled, or whether the history is simply too short to say.

The toolbar

Control Options Default
Window 24 hours, 7 days, 30 days 7 days
Agent activity Opens Agent Activity.
Step failures Opens Job Step Failures.

Where the data comes from

Source What it gives
dbo.sysschedules freq_type, freq_interval, freq_subday_type, freq_subday_interval, the active start and end times and dates.
dbo.sysjobschedules The join between jobs and schedules, and next_run_date.
dbo.sysjobs The jobs and whether they are enabled.
dbo.sysjobhistory The runs that actually happened, filtered to job outcome rows.

One caution about the window

Agent trims sysjobhistory to a row count, so the Ran figure can be short simply because the history has been trimmed rather than because a run was missed. The caveat line says so whenever the oldest history in the window is newer than the window itself, and Agent Settings is where the limit is.


Messages you may see

There are no jobs on this instance. Nothing is scheduled, so nothing can be missed. On an instance that does run jobs, an empty page here means this login cannot see them.


Report Why you would go there
Agent Activity Whether Agent was up when these runs were due. The holes in the Agent lane are the explanation.
Job Step Failures The runs that did happen and went wrong.
Failed Jobs The job level failures.
Agent Settings The history row limit, and the idle definition.
Job Schedules The schedules themselves, in their own report.

Frequently asked questions

Due and Ran disagree and Agent was up the whole time. Check whether the schedule is enabled. A job can be enabled with a disabled schedule attached, and that combination runs nothing while looking healthy in the job list.

The Missed column is blank for some jobs. Those are on an on Agent start or on idle schedule, or have no schedule at all. The page refuses to guess for them rather than producing a number it cannot stand behind.

Next run is in the past. Agent recomputes next_run_date when it processes the schedule. A date in the past means it has not, which usually means the service was down at the moment it was due.

Ran is lower than Due and nothing is wrong. Look at the caveat line. If the job history has been trimmed inside your window, the Ran figure is short by however much was trimmed.