If they had moved him when they announced they were going to, Ruby would not have been there. Pretty simple.
Or one of his friends among the cops and clerks let him know about Oswald’s movements?