renamed check_if_in_schedule to check_if_outside_schedule; refactored seconds