We do not currently know of any antonyms for on a whim.
The prepositional phrase on a whim is defined as: