It was all a coincidence - one arranged by Eru, no doubt - that the army marched from Minas Morgul when Frodo, Sam, and Gollum were passing by with The Ring.
There are silent watchers at Minas Morgul as well as Cirith Ungol. When Gorbag from Minas Morgul meets Shagrat near Cirith Ungol he says:
"…See here – our Silent Watchers were uneasy more than two days ago, that I know. But my patrol wasn’t ordered out for another day, nor any message sent to Lugbúrz either: owing to the Great Signal going up, and the High Nazgûl going off to the war, and all that. And then they couldn’t get Lugbúrz to pay attention for a good while, I’m told."
https://middle-earth.xenite.org/what-are-the-silent-watchers-of-mordor/1
So the Silent Watchers at Minas Morgul did sense something when Frodo and The Ring were near.
But I don't remember any outward signs of the Silent Watchers reaction to sensing The Ring in the book.
In the book, the Great Signal to begin the invasion was sent by the Dark Tower of Mordor.
The Great Signal, as Gorbag the Orc called it,2 occurred on 10 March T.A. 3019.1 On that date, as Sam and Gollum urged the weary Frodo to stand up and start climbing the Stairs of Cirith Ungol, the ground shook and a vivid, violent red flash leapt up from within Mordor, painting the clouds crimson, followed by a crack of thunder. The Signal was answered by Minas Morgul; blue lightning forked from the tallest tower and surrounding hills into the dark clouds.[3]
The Great Signal was the call for the armies of Mordor to begin the assault upon Minas Tirith. As the hobbits and Gollum watched the gates of Minas Morgul opened and an army came forth, led by the Lord of the Nazgûl. [3] At the same time another army issued from the Morannon heading for Cair Andros,1 probably set in motion by the same Great Signal.
In the movie The Lord of the Rings: The Return of the King (2003) the great signal is sent from Minas Morgul only, and thus might possibly have been triggered by detecting Frodo and Sam.
In Scene 16, "Minas Morgul", the Great Signal occurs just after Sam and Gollum have prevented Frodo from walking straight up the road to the gates of the city. There is no eruption of light from Mordor; the signal consists of a swirling twister of luminous vapor shooting into the clouds above the central tower. The scene cuts to Minas Tirith where Gandalf and Pippin witness the Signal. Frodo, Sam, and Gollum rush back to the base of the stairs and hide behind an outcropping of rock. Soldiers and citizens of Minas Tirith are shown silently reacting in alarm to the sight. The Lord of the Nazgûl appears on a Fell Beast and the Orcs march from the city.
http://tolkiengateway.net/wiki/Great_Signal2
The great signal in the movie could, chronologically speaking, have been triggered by the silent watchers of Minas Morgul sensing Frodo with The Ring, since the Great Signal was sent from Minas Morgul and not from the Barad-dur.
But if the Silent Watchers were agitated enough for the Witch King to made a change in the timing of the invasion, why didn't the Witch King send soldiers out to search for who or what disturbed the Silent Watchers?
If the Witch King's logic went like this:
"Our intruder detectors are agitated. There must be intruders lurking around. There are four hours left before the scheduled departure of our troops, so we could send some out to look for the intruders. But no, Let's march out with all our warriors right now, four hours ahead of schedule, and ignore the hostile intruders."
He wouldn't seem like a very intelligent commander.
So it was probably just a coincidence that The Great Signal was sent up by Minas Morgul, and the troops marched out, just as Frodo was passing with The Ring, even in the movies.
In the book Sauron sent the Great Signal to begin the invasion from Barad-Dur long before he could have learned about the Silent Watchers at Minas Morgul being disturbed and order the garrison there to send out a patrol.
Gorbag says:
But my patrol wasn’t ordered out for another day, nor any message sent to Lugbúrz either: owing to the Great Signal going up, and the High Nazgûl going off to the war, and all that. And then they couldn’t get Lugbúrz to pay attention for a good while, I’m told.
So in the books the timing of the Great Signal was definitely a coincidence. A coincidence arranged by Eru, who fancies himself a writer and so arranges the order of events for dramatic effect.
https://middle-earth.xenite.org/what-are-the-silent-watchers-of-mordor/1