A vertical thermal gradient is generated in a solution of a thermoreversible photochromic spiro-oxazine in methanol or acetone by UV irradiation at the bottom of the solution and evaporation of solvent at the top. When the gradient is sufficiently high, it triggers color oscillations and waves due to hydrodynamic convective motion of the solution. Experiments on such systems in several configurations are presented and simulated with a reaction-diffusion-convection model, which yields good agreement with the experiments. The photoexcitable system described in this work constitutes a prototype of a "photochemical oscillator" which, analogously to an electronic oscillator, converts the continuous UV energy into alternating optical visible and UV signals with periods between 15 and 70 s.