Fix expected exception in schedule no cron test