The first, your schedule, simply helps you fit your meals within the constraints of your lifestyle and day to day activities. Not everyone can take a break from their jobs every three hours on the dot to open up the lunch box and chow down. That doesn’t tend to go over well in the middle of meetings.
So, we have to realistically look at what times in your day you have available to get a meal in. Ideally we’d want them to be relatively evenly distributed throughout the day, but if you have 2 hours between two meals and 4 hours until the next you’re not going to lose your gains or have your metabolism decide “nope you missed the window, I’m only storing this as fat. Do better next time.”
There is value in nutrient timing, so we do have to take this into consideration. Unfortunately, just eating “whenever” isn’t going to be ideal for most people, especially if your goal is to optimize body composition. The easiest way to plan your meal schedule is by starting with the fixed times you know you’ll have available and that you’ll need nutrients; breakfast and your post-workout meal.
Once you have those two, it is just a matter of determining when you have the time to consume the other meals in your day to reach your nutrient requirements for the day. The number of meals that you may need to achieve that, depends on the next factor.