There's no rule for this. The school will only know, formally, that the student has to attend summer school once the semester closes and the final grades are in. They can't notify you of the need for summer school until all that happens. I've seen families be given only a day or two of notice between "the student formally got that F!" and summer school starting.
Was the F a surprise? The F shouldn't be a surprise. Normally, you've received report cards, had parent/teacher conferences or other opportunities to speak to the teachers, perhaps even had the option to have access to the student's real time grades online. If the F really was a surprise, contact the Principal of the school and talk over the situation, so you better understand what happened.