Regarding oath taking for any reason whatsoever, or a person making an oath to another person, for instance, to pay the bills for a meal; it is upon the one who swears to fulfill the duty he took an oath on.
It is not permissible for a Muslim to take oaths constantly and unnecessarily as Allah SWT says in Q 5:89 “and guard your oaths”.
Sheikh Uthaimeen says: It is upon the one who swears in certain circumstances in order to avoid breaking the oath, to say: “By Allah, If Allah wills”. When he does this, even if he is unable to fulfil his promise, it will not count against him.