Spin-crossover (SCO) metal complexes are expected to be widely used in data storage materials, display devices and sensors. Although a lot of spin-crossover photoswitches have been developed, the reversible photomodulation cases that work at room temperature are limited. Herein, a novel cobalt complex o-1-Co(II) wherein the salen unit bridges with bis-diarylethene has been designed as switch to construct "off-on" logic operation at room temperature. The complex o-1-Co(II) displays an abrupt, reversible and hysteretic spin crossover (T 1/2 ↓=166 K, T 1/2 ↑=177 K, and ΔT 1/2 =11 K) between the high-spin (HS) and low-spin (LS) states. Meanwhile, photocyclization of o-1-Co(II) with UV light produces a photoresponsive closed form c-1-Co(II), which always stays at low-spin without SCO at all. Moreover, the magnetic switching of the complex can also be achieved with redox reactions between Co(II) and Co(III).