More robust scheduled job delete code