Under misfolded protein stress, the endoplasmic reticulum (ER) activates the unfolded protein response (UPR) to restore homeostasis, or commits the cell to apoptosis. A study now uncovers how the UPR is governed by the circadian clock to adjust ER protein-folding capacity to metabolic demand and protect against liver damage.