Skip to content

Commit

Permalink
fix excessive deletion in get_crontab_contents.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gspetro-NOAA committed Sep 11, 2024
1 parent c037c6a commit 2a1d95a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ush/get_crontab_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ def get_crontab_contents(called_from_cron, machine, debug):
"""

crontab_cmd = "crontab"

print_info_msg(
f"""
Getting crontab content with command:
=========================================================
{crontab_cmd} -l
=========================================================""",
verbose=debug,
)

(_, crontab_contents, _) = run_command(f"{crontab_cmd} -l")

if crontab_contents.startswith('no crontab for'):
crontab_contents=''

Expand Down

0 comments on commit 2a1d95a

Please sign in to comment.