Just getting there involves the consideration of a number of variables.

Like the energy needed to transfer between planetary orbits. For trips between Earth and Mars, the lowest energy intervals happen every 26 months, so missions are planned to launch during these time periods.