When you do something that doesn't earn you any gratitude, you can call it thankless. Handing out parking tickets and giving unsolicited advice can both be thankless jobs.
If no one says, "Thanks!" despite your hard work, your task was a thankless one. You can also describe the person who doesn't express gratitude that way—Shakespeare's King Lear famously did this by saying, "How sharper than a serpent's tooth it is to have a thankless child!"