timing function set up for night routines to save