diff --git a/library/system/cron b/library/system/cron index 3bf43b7d56..f0fd0c2a27 100644 --- a/library/system/cron +++ b/library/system/cron @@ -464,8 +464,10 @@ def main(): crontab.write(backup_file) if crontab.cron_file and not do_install: - crontab.remove_job_file() - changed = True + if crontab.remove_job_file(): + changed = True + else: + changed = False module.exit_json(changed=changed,cron_file=cron_file,state=state) job = crontab.get_cron_job(minute, hour, day, month, weekday, job, special_time)