@mrpasini @peternlewis @gglick @ccstone @JMichaelTX
I wrote to the developer of CCC Mike Bombich who by the way seems to be a very nice person, explaining that we are having a discussion in the KBM forum about sleep, wake and scheduling actions (tasks, triggers, etc) and the fact that CCC performs backups at night when the computer is asleep.
I am copy pasting his answer after having obtained his permission.
In my question, I summarized the different opinions above.
His complete answer is pasted below.
I'm happy to settle the debate
In this case, you're all correct to some degree. Applications themselves cannot wake a sleeping Mac, only the System Management Chip on the motherboard can wake the system. However, any application may schedule a wake event with the SMC controller. There's nothing proprietary in that request, there is a standard system interface that we use, for example:
IOPMSchedulePowerEvent(wakeTime, BUNDLE_IDENTIFIER, CFSTR(kIOPMAutoWake));
IOPMSchedulePowerEvent(wakeTime, BUNDLE_IDENTIFIER, CFSTR(kIOPMAutoWakeOrPowerOn));
CCC schedules a wake event any time you schedule a task that is configured to wake the system at the scheduled run time.
CCC schedules a wake event with the system, and then when the system wakes at the scheduled run time, CCC runs the task. It's also worth noting, however, that macOS also has a ~2 hour "Dark Wake" cycle. Every two hours the system will wake from sleep automatically, and at that time background tasks have an opportunity to do work. If your CCC task's sleep handling is configured to "Run when the system next wakes", then CCC will not schedule a wake event, rather it will run during a Dark Wake cycle that happens to occur after the scheduled run time has elapsed.