The tiny fish hatch from eggs, and within a day or so, the larvae are old enough to find their own food. Then they have to grow up and reproduce within a month or two — before they get eaten. They spent two to three weeks as larvae outside the reef and then have a few weeks to become sexually mature once they return to the reef.
Source: Los Angeles Times May 29, 2019 18:33 UTC