Only when the purpose of casting has absolutely nothing to do with yourself. If there is a situation with someone that impacts both you & your intended target, you will often find that casting on yourself, with regard to the role you play in the situation, is far more productive, and produces faster results, than casting on your intended target.
For example, if you are in a love triangle, or you want a lost love to come back to you, you are better off casting on yourself to make yourself more appealing to the person than you are to cast a spell on them to have them come back, or stop seeing the third person.
Why? Because when you cast on another person you are attempting to influence them directly. You are attempting to sway them, solely, in the matter. However, you are the person you are advocating for in the spellwork. You are, ultimately, the person who benefits from the spell, therefore, you are better off casting on yourself. Your energy, your intent, and your motivation becomes a moving part of the spell that is constantly working, which is a "warm casting". Whereas casting on someone when they have no participation, or intent, with the spell, is a "cold casting", and the results are less efficient & quick because they have no idea it's happening, and therefore have no energy or motivation to put behind the spell you cast.
The only time you should cast on someone is if you have absolutely no role to play in the situation. Such as someone who is ill, and you are not around them at all. Any situation where you do not play a part and the person is the sole beneficiary of the spell's results.