diff --git a/library/cron b/library/cron index 514afbefa3..2a71a2a063 100755 --- a/library/cron +++ b/library/cron @@ -146,9 +146,9 @@ def get_jobs_file(module, user, tmpfile, cron_file): def install_jobs(module, user, tmpfile, cron_file): if cron_file: - dest_tmp = "%s.%s.%s.tmp" % (dest,os.getpid(),time.time()) + dest_tmp = "%s.%s.%s.tmp" % (cron_file,os.getpid(),time.time()) shutil.copyfile(tmpfile, dest_tmp) - module.atomic_replace(dest_tmp, dest) + module.atomic_replace(dest_tmp, cron_file) else: cmd = "crontab %s %s" % (user, tmpfile)