Linux: delete `TEMP_CRON` file even if command fails

This commit is contained in:
Shreya 2020-07-13 20:13:47 +05:30
parent c38875d71e
commit 5bbef83b83
1 changed files with 1 additions and 1 deletions

View File

@ -7,6 +7,6 @@ def get_linux_commands_to_schedule_jobs():
f'crontab -l > {TEMP_CRON} &&', f'crontab -l > {TEMP_CRON} &&',
'echo \"# Successfully scheduled a job using crontab\" |', 'echo \"# Successfully scheduled a job using crontab\" |',
f'tee -a {TEMP_CRON} &&', f'tee -a {TEMP_CRON} &&',
f'crontab {TEMP_CRON} &&', f'crontab {TEMP_CRON} ;',
f'rm {TEMP_CRON}' f'rm {TEMP_CRON}'
] ]