The Dons narrowly avoided an embarrassing defeat to the amateurs when the sides also met in the 2020 competition.
Watson Boas scored two minutes from time to spare Doncaster’s blushes and secure a hard-earned 24-20 victory.
Immediately after the game Dons boss Richard Horne had a warning for his players as they began preparations for this weekend’s second round tie at the Eco-Power Stadium.
"We’ve played these before in the Challenge Cup and if it wasn’t for Watson [Boas] coming up with a bit of individual brilliance we’d have been out of the cup,” said Horne.
“They were the better team on the day.
"I spoke about that straight after the game [against Castleford].
"We’re going to have an opposition that’s going to be very aggressive and they’ve got some older lads in there that know how to play the game and know how to get about a rugby field and will cause us problems if we turn over ball like we did against them last time.
"We have to be making sure we’re finishing our sets where we need to and execute our plays better.”
Thornhill, of the National Conference League Premier Division, beat the RAF 24-6 in the first round.
The West Yorkshire side has beaten professional opposition twice in their history - Sheffield Eagles in 2000 and Workington Town in 2006.