macOS Sierra 10.12-10.12.5 has a bug which results in Time Machine backups and other scheduled activities becoming unreliable and irregular when Macs are left running for several days. Although it was reported to Apple in February 2017, it has persisted into 10.12.5; I hope that the imminent update to 10.12.6 will finally fix it, but in the meantime here is the latest information.
The most common problem which users notice is that Time Machine’s regular hourly backups suddenly become irregular, may be skipped for several hours, and at other times macOS may try to make them at very frequent intervals.
This usually occurs if a Mac has been running continuously (and normally without system sleep) for more than a week. However, it can occur more quickly, after just three or four days, and sometimes may not occur for more than fourteen days.
The easiest way to diagnose this bug is using my free T2M2, from Downloads. If a backup hasn’t been run for more than 90 minutes, T2M2 looks in the logs at the systems responsible for scheduling backups, and assesses their health. It typically shows something like the following, with the red traffic light indicator.
You can obtain more details by browsing the log using Consolation, or DispatchView, which is specially configured to look at the scheduling and dispatching systems involved. Both apps are available free from Downloads above, and contain extensive help matter.
Although I recently suggested that putting your Mac into system sleep for a few minutes might allow recovery, that is not the case. System sleep and logging out and back in are likely to trigger another backup, but they do nothing to fix the underlying problem.
Once backups have become irregular, the only solution is the restart that Mac.
System sleep (not display sleep alone) does, though, have a role in preventing the bug from occurring. Putting your Mac to sleep every few days can postpone the appearance of the bug for several weeks, or perhaps even longer.
One reason why you may not want to put your Mac to sleep is because it cannot sleep the system without sleeping its hard drive, and you do not want to sleep your hard drive often because it increases wear. You may prefer to use the Terminal command
which puts the system to sleep immediately, and provided hard disk sleep is disabled in Energy Saver, this may not put the disk to sleep too, although this varies by model.
Time Machine backups are only one of around seventy different services which are scheduled and dispatched by the same mechanism. Other less visible services are just as important to the health and running of your Mac. When backups become irregular, those other services also fail. Even if you think that you can get by with infrequent and irregular backups, you cannot do without all those services for long. Once backups become irregular, you should aim to restart your Mac as soon as is convenient.
This is a serious problem for servers in particular. Until Apple fixes this bug, system admins should plan to put servers to sleep every few days, and for the occasional restart to be necessary.