Consider this scenario:
Your computer is broken, so you call tech support. When they arrive to fix the computer, the problem is no longer present and the computer works as intended. Shortly after they leave, the problem begins again.
In this example your computer is broken when you need it to work, and works when you need it to be broken. Is there a phrase that describes this? I know Murphy's Law comes close to describing it, but doesn't seem to fit very well.