WASHINGTON — For President Trump, who adores the pomp and precision of military ceremonies, this was the year he would finally get one of the special perks of being president — delivering the commencement address at West Point, the only service academy where he has not spoken.

But the graduation was postponed because of the coronavirus, the cadets were sent home and officials at the school were not sure when it would be held or even whether it was a good idea to hold it.

The Naval Academy, for its part, decided it was too risky to recall its nearly 1,000 graduating midshipmen to Annapolis, Md., for a commencement. Those graduates will have a virtual event. But the Air Force Academy, in contrast to the other schools, sent home its underclassmen, locked down its seniors on campus, moved up graduation, mandated social distancing — and went ahead with plans for Vice President Mike Pence to be its speaker.

And so last Friday, the day before Mr. Pence was to speak at the Air Force ceremony in Colorado, Mr. Trump, never one to be upstaged, abruptly announced that he would, in fact, be speaking at West Point.