scheduler example with comments