I've read this short story within the past 5 years, somewhere online, but I don't believe it was a new or recent story. It is definitely a short story, and a very short one at that, possibly 1700 words or less.
The short story involves aliens attempting to contact a planet only to realize that all of the people are dead but the automated systems of two nations are continuing their war forever. I don't believe the aliens or planet are ever named.
When the automated systems detect the aliens they both pause to fire nuclear missiles at the aliens before continuing their war against each other.
The aliens depart, labeling the planet as extremely dangerous.
I think the key details are the observation by aliens, that the aliens never land, specifically nuclear weapons mentioned, and that the machines are not sentient in any way. This is a case of automated systems and factories, not like android soldiers.
Similar things I've looked into but that are NOT this short story (I have not personally read all of these so if you think I'm wrong, I'll look into it):
Short Stories and Novels
The Gun by Philip K. Dick - Short story. The people land on the planet and there's just the automated super gun. Read this one, the characterization of the visitors, their landing on the planet, and length show it is not the one.
The Second Variety (and sequel Jon's World) by Philip K Dick - Short stories. Humans develop robots to fight their wars, which in turn develop their own robots.
The Defenders by Philip K Dick - Short story. US and Soviets go underground to allow robots to continue their war. Read this one.
Autofac by Philip K Dick - Short story. Humans seek to raid and shut off a factory that endlessly consumes resources. Read this one.
The Midas Plague by Frederik Pohl - Novelette. Automated goods are produced at such a rate that humanity struggles to use the goods fast enough. Similar premise to Autofac, though satirical tone.
War with the Robots by Harry Harrison - Short story. Humans pushed out of underground bunkers because they are inconvenient to the war being fought by their robots
Planet of No Return by Harry Harrison - Novel. An investigator is looking into an automated war on a primitive planet
There Will Come Soft Rains by Ray Bradbury - Short story. An automated house continues its routine after nuclear apocalypse. Part of The Martian Chronicles. Read this one.
Space Angel by John Maddox Roberts- Novel. A space opera adventure where the crew find a derelict fleet.
Fiasco by Stanislaw Lem - Novel. A first contact story, involving mysterious mounds on an alien planet.
The Invincible by Stanislaw Lem - Novel. Crew exploring a ruined planet in search of a lost ship and crew.
Tomorrow and Tomorrow by Charles Sheffield - Novel. About traveling forward through time. An expansion of the short story The Long Chance.
The Berserker series by Fred Saberhagen - Novel. AI programmed to fight a war by a long dead species seeks to destroy all organic life in the universe.
The Forge of God/Anvil of Stars by Greg Bear - Novels. Similar to the Berserker series, self replicating machines with AI seeking to wipe out all life.
Lungfish by David Brin - Short story published in The River of Time. AI observe humans and their own AI researching the mechanical remains of an alien civilization.
Moderan by David Bunch - Novel series. War involving cyborgs.
Strength of Stones by Greg Bear - automated cities cast out humans and pursue their own aims.
Galactic Center Saga by Gregory Benford - Series on conflict between organic and automated life in the universe.
The Flying Dutchman by Ward Moore - Short story. Automated bomber stopping at an automated airport to continue endless bombing run. Read this one, lacks the alien observers, the nuclear weapons, the factories firing missiles. It is rather good and haunting though and I recommend it.
The Red Flower was a War Factory by Stephen Landry - Short story. Scientists investigating an alien planet discover an underground complex.
War Factory by Neal Asher - Novel. Part of a larger series, plot involves the search for a space station factory thought destroyed.
Trucks by Stephen King - Short story. Made into the film Maximum Overdrive. An apocalyptic event causes Earth's vehicles to start murdering people.
Slaves to the Metal Horde by Milton Lesser - Short story. A post apocalyptic world where humans are slaves to machines.
Television, Web videos, etc.
It is definitely not any of this kind of media, but I have added these to show I've checked them out.
The Fortress - Almost identical to the Flying Dutchman in plot, though more futuristic in style. A Russian short film about an automated bomber performing never ending bombing runs on a world where all of the people are dead.
Star Trek episodes such as Arsenal of Freedom, Taste of Armageddon, and Prototype.
Battlestar Galacticta the show, either series.
NieR: Automata the videogame