When the new school timetable will not fit
Most lessons fit into a new timetable quickly. The last few can take days, because every move breaks another rule. Our school scheduling project places every lesson within the school's rules and explains anything that cannot fit.
Every new school year, someone rebuilds the school timetable (jadual waktu). Teachers join and leave, subject allocations change and recess times shift. In many primary schools this falls to a senior assistant, working in Excel.
Most lessons go in within a day. The last few can take much longer, because every move that fits one lesson breaks another: a teacher ends up in two classes at once, or a double period lands across recess. A clash that slips through is usually found in the first week of term, when it disrupts real classes.
Our school scheduling project builds the year’s timetable from the school’s own records. It is in development and is being tested with a pilot school. The examples below use fictional classes and teachers.
Why the last few lessons are the hardest
A primary school timetable has to satisfy several rules at once:
- Staggered recess. Lower and upper years often break at different times, so a teacher shared between them can clash even when the period numbers look free.
- Double periods. Some lessons need two periods together, and they cannot be split by recess.
- Lessons that run together. Pendidikan Islam and Pendidikan Moral are taught at the same time, so every teacher involved must be free at once.
- Teacher limits. Each teacher has a maximum number of periods per day and per week, and days when they are away.
Checking all of this by eye across every class and every teacher is slow, and one late change can undo hours of careful fitting.
How our scheduling engine approaches it
It starts from the files the school already has. The engine reads the class timetables, the teachers’ personal timetables and the subject allocation sheet (agihan). It matches teacher names that are spelled differently in different files, and lists anything that does not match before a timetable is built.

It places every lesson within the school’s rules, including staggered recess, double periods, lessons that run together and each teacher’s limits.
It checks the result separately. A second, independent check tests every rule against the finished timetable. The same check works on a timetable made or edited by hand, so an existing timetable can be checked before anything changes.
It explains anything that cannot fit. Instead of forcing a lesson into a place that breaks a rule, the engine leaves it unplaced and gives the reasons: the teacher is teaching elsewhere, a daily limit is reached, or there is no gap long enough without crossing recess.
It lets the administrator decide. Lessons can be moved by hand, and only moves that keep every rule are offered. Lessons the school has agreed on can be locked, and the rest rebuilt around them.
It prints what the school needs: class timetables, teacher timetables and the master timetable, as PDF or Excel, with Malay or English headings.
Example: one lesson that will not fit
Class 4 Amanah needs a double period of Pendidikan Seni Visual with Cikgu Farah. On Wednesday the class has two free periods, but recess falls between them. At the other open times, Cikgu Farah is already teaching 5 Bestari.

The administrator sees exactly what is blocking the lesson. One option is to move a Wednesday lesson so that the two free periods sit together before recess. Another is to swap Cikgu Farah’s 5 Bestari lesson to a different time. Either way, the decision stays with the school, and every move offered keeps the timetable valid.
Tested on a real school’s timetable
In testing with the pilot school’s real data, covering 11 classes, 23 teachers and 529 periods a week, the engine placed every period and passed every rule check in under three seconds. The school’s own hand-made timetable also passes the same checks, which confirms that the rules match how the school actually works.
What changes for the school
The administrator’s time moves from fitting lessons one by one to reviewing a complete timetable and deciding the few cases the rules cannot settle. When something changes during the year, such as a new teacher or a long leave, the timetable can be checked again or rebuilt around the lessons that should stay.
The same timetable then supports daily relief cover, described in our post on arranging relief cover.
Apply the approach to other scheduling
The same approach suits any business that has to fit people, rooms or equipment into time slots under fixed rules:
- Retail and food outlets: shift rosters that respect opening hours, minimum staff per shift, rest days and weekly hours. Staff would need a simple way to record availability from their phones.
- Clinics and therapy centres: practitioners, rooms and equipment booked together for appointments of different lengths. Booking rules for each service would be added.
- Training centres and tuition centres: classes, rooms and tutors across branches. Term calendars and room capacities would be added.
- Maintenance and field teams: jobs matched to skills, with travel time between sites. Locations and travel estimates would be added.
Each adaptation starts from the rules the business already follows, written down so the software can check them every time.