See this Comm Center thread by Josh Walawender. The AutoFlat script also looks at dusk though the scheduler does choose the dawn flat plan. This should only happen for panel flats.