def METHOD_NAME(called_from_cron, machine, crontab_line, debug):
    """Delete crontab line after job is complete i.e. either SUCCESS/FAILURE
    but not IN PROGRESS status"""
    #
    # Get the full contents of the user's cron table.
    #
    (crontab_cmd, crontab_contents) = get_crontab_contents(called_from_cron, machine, debug)
    #
    # Remove the line in the contents of the cron table corresponding to the
    # current forecast experiment (if that line is part of the contents).
    # Then record the results back into the user's cron table.
    #
    print_info_msg(
        f"""
        Crontab contents before delete:
        =========================================================
          {crontab_contents}
        =========================================================""",
        verbose=debug,
    )
    if crontab_line in crontab_contents:
        #Try removing with a newline first, then fall back to without newline
        crontab_contents = crontab_contents.replace(crontab_line + "\n", "")
        crontab_contents = crontab_contents.replace(crontab_line, "")
    else:
        print(f"\nWARNING: line not found in crontab, nothing to remove:\n {crontab_line}\n")
    run_command(f"""echo '{crontab_contents}' | {crontab_cmd}""")
    print_info_msg(
        f"""
        Crontab contents after delete:
        =========================================================
          {crontab_contents}
        =========================================================""",
        verbose=debug,
    )