you could perhaps make it a timed thing by using a variable
if (%variable != on) {
........
set -u<time> %variable on