Scheduler and tests