The movement of Oswald was well known - the press was there in force. I'm sure you've seen replays of the television coverage. Remember, Oswald had made several previous appearances at the Municipal Building, including attending at least one press conference. With Ruby's ties to the cops and local reporters, he likely would have had good intelligence as to when Oswald was being moved.
And Oswald's transfer was planned and announced at a certain time, but it didn't happen. It was delayed. The last delay caused by Oswald himself. Nobody could have anticipated that.
Yet the evidence is that Ruby had just walked in seconds before Oswald came out the door. If Ruby had been relying on even inside information, he would have been there much earlier. It simply wasn't possible to have been pre-planned.