The automatic generation of a real-time scheduler for scheduling the execution of tasks on a real-time system is disclosed. The scheduler may allow task overruns in the execution of the tasks on the real-time system. The task overruns may occur when the execution of a task for a current sample hit is not completed before a next sample hit. When the task overruns occur, the scheduler may delay the execution of the task for the next sample hit until the execution of the task for the current sample hit is completed. The execution of the task for the next sample hit is performed after the execution of the task for the current sample hit is completed.