After the warm-room computer turns on the power at the dome, the dome computers wait till sunset and calibrate the telescope. If clouds aren't present, the dome shutter opens and the observatory waits till a specific sun angle. At that time the telescope points to the zenith and starts to take twilight flats for all filters. Bias and then later darks are also taken. Anyone who has taken twilight flat knows that timing is everything.
Sky brightness changes rapidly, so the 'window' for a successful calibration run is small.
The automated system just described always gets its flats unless it is cloudy. Focusing the camera is not trivial. The last focus position is stored in the startup file. A suitable navigation star is chosen for focusing. Quarter-Max is determined for the current position.