When Hunuman Broke Shani Devs pride
Lord Hanuman will repay his guru Lord Surya after he has finished his education. Hanuman insists on asking for his Guru Dakshina. Surya advises Hanuman not to repay him any money. Lord Surya talks to Hanuman about Shani, who is a troublemaker and never listens. Hanuman asks him to help him.
Hanuman then enters Shani Lok asking Shani to please return to her father. Shani, being too arrogant, can't believe Hanuman was able to effortlessly enter his Shani Lok. So, he decides he will teach Hanuman something. He then climbs on Lord Hanuman’s shoulder and tries to influence him. He is surprised to find that it does not affect Lord Hauman.
Lord Hanuman actually increases his size to the point that Shani is caught between Hanuman's shoulder, the ceiling, and Hanuman. Shani demands that Hanuman leave him, promising that he would not trouble Hanuman devotees and that he would only moderate all his effects before Hanuman devotees. Hanuman realized this and released Shani dev.
Next, Shani Dev asks Lord Hanuman for his tail in order to apply and escape the pain. Since then, it has been common to offer oil/black til to Shani Devta. It soothes his suffering and also makes him beneficent towards Ram-and Hanuman devotees. It is why you can see huge lines at Hanuman temples every Saturday for Shani and Hanuman. Shani's dosh doesn't affect those who give till and a tail (oil) offering to Shani.