While COMEVIL is in essence correct, it's important to keep a couple of things in mind. First, folks who pin on O4 closer to 11 years commissioned (quite a few folks on the most recent list) may not have 6 years as an O4 before they come into zone for O-5 because of US law regarding flow points (upper limit is an average of 17 years to O5, I think). As I understand the process, they are more likely to have 5 years as an O4. Second (and continuing with those having 5 years as an O4), if you take orders as an O3 in zone or as a LCDR select to something other than a milestone billet (the majority of officers), you will be behind the power curve in relation to the example COMEVIL laid out (by a couple years, most likely). The next job would seemingly have to be a milestone, followed by an XO job. Noticeably absent here is the joint job. If you take a joint job you may be encumbered up to 3 years. It is difficult to do a joint tour at the O4 level and remain competitive for O4 XO, and by extension, competitive for O5 command. It is kind of an either/or proposition.
Take a one year or less tour anywhere. This could be college, NAVCENT, etc. This would accelerate entrance into your next job, hopefully a milestone. Admittedly, I'm not sure how many of these there are. One could also apply for a fellowship program which lasts just a short period of time. Third, ask the detailer if there are joint AND milestone jobs. I'm not sure of the answer, but given CYBERCOM, it makes sense. Also, plan on doing a joint job as an O5, vice O4. They are sometime harder to fit in as you progress higher, but if you screen for O5 command, you shouldn't have any problem getting things to bend in your favor. Finally, and most important, be very clear with the detailer about what your goals are and be respectfully insistent. This can be tricky, but the detailing process isn't designed for you specifically. As such, if you don't take charge of your career timing and aren't working hard with the detailer to get what is needed to meet your individual goals, it is easy to become a victim of the large weaknesses in the system such as timing, opportunities, personalities, and everything else which goes into the detailing process. Ultimately, detailers have to fill open billets, and the detailing process we have, however weak, strong, or faulty, is the only tool at their disposable. Not getting what you want/need is not necessarily their fault. Likewise, no one should fault you for advocating for your own career needs. Plan your career, then do some branch planning so you won't feel left behind when the next trend hits (anyone remember IO?). You don't need a perfect plan, just an executable one. If you have an executable plan, you'll always be ahead of the slower bureaucracy.