A method for executing two tasks in timesharing, comprising the steps of: • decomposing offline each task in a repetitive sequence of consecutive frames (RSF) in a time base associated with the task, wherein each frame (F) is associated with an atomic operation having an execution need (D), and defines a start date from which the operation may start and a deadline (E) by which the operation must end, whereby each frame defines a time margin (T) in which the operation may start; • verifying for each frame (Fa i ) of a first of the repetitive sequences (RSFa) that the corresponding operation (Da i ) can be performed between any two successive operations of a group of frames (Fb j , Fb j+1 ) of the second repetitive sequence (RSFb), overlapping the frame (Fa i ) of the first repetitive sequence, while respecting the start dates and deadlines of the operations; and • if the verification is satisfied, allowing the execution of the two tasks and scheduling the operations of the two tasks according to the following cases, evaluated at each key date, wherein a key date occurs at each deadline, each start date, and each end of operation: - if two operations (Da 3 , Db 2 ) can start, executing the operation (Da 3 ) having the shorter deadline; and - if a single operation can start, executing it only if its execution need is less than the time remaining until the start date of the next frame of the other sequence, plus the margin of time (T) associated with said next frame of the other sequence. • decomposing offline each task in a repetitive sequence of consecutive frames (RSF) in a time base associated with the task, wherein each frame (F) is associated with an atomic operation having an execution need (D), and defines a start date from which the operation may start and a deadline (E) by which the operation must end, whereby each frame defines a time margin (T) in which the operation may start; • verifying for each frame (Fa i ) of a first of the repetitive sequences (RSFa) that the corresponding operation (Da i ) can be performed between any two successive operations of a group of frames (Fb j , Fb j+1 ) of the second repetitive sequence (RSFb), overlapping the frame (Fa i ) of the first repetitive sequence, while respecting the start dates and deadlines of the operations; and • if the verification is satisfied, allowing the execution of the two tasks and scheduling the operations of the two tasks according to the following cases, evaluated at each key date, wherein a key date occurs at each deadline, each start date, and each end of operation: - if two operations (Da 3 , Db 2 ) can start, executing the operation (Da 3 ) having the shorter deadline; and - if a single operation can start, executing it only if its execution need is less than the time remaining until the start date of the next frame of the other sequence, plus the margin of time (T) associated with said next frame of the other sequence. - if two operations (Da 3 , Db 2 ) can start, executing the operation (Da 3 ) having the shorter deadline; and - if a single operation can start, executing it only if its execution need is less than the time remaining until the start date of the next frame of the other sequence, plus the margin of time (T) associated with said next frame of the other sequence. <EOS>