diff --git a/cron b/cron index 51a8abf2933..7d0ef5db4c0 100644 --- a/cron +++ b/cron @@ -333,12 +333,9 @@ def main(): os.unlink(backupfile) module.exit_json(changed=changed,cron_file=cron_file,state=state) - if (rc != 0): - module.fail_json(msg=err) - if changed: # If the file is empty - remove it - if rm: + if rm and cron_file: remove_job_file(cron_file) else: if backup: