A simple scheduler to schedule tasks