Track state of (un)scheduled jobs and add test