The phrase
"thankless task" refers to a job or responsibility that is often difficult or demanding but goes unnoticed or unappreciated by others, making it unlikely for the person doing it to receive gratitude or appreciation for their efforts.
Full definition