Jobs and state machines