Added option to only run between certain times.