"just in time" is the correct expression. It is very common. It means "moments before something else started happening".
We arrived at the station just in time (to catch the train).
"right on time" is another useful expression. It means "specifically at an exact time".
The movie started right on time (at exactly the time it was supposed to start).