Design a job scheduler that accepts a function f and an integer n. The scheduler should execute the function f…