you simply plan date your going to arrive and apply a month before travel. Done a few was not hard to plan. You then get 60 days on arrival if it's a tourist Visa you applied for.
It does not guarantee you entry just because you did it online. Frank said you get approval for entry but it's no guarantee until you get in front of an immigration officer. Yes it's checked when you arrive but you don't have to do it online, you can do it just before immigration on arrival.