Depends on what "halfway through marathon schedule" is, how you usually recover and what's your usual mileage.
A 20y old that has been running >80km/weeks for 2y can race a half marathon one Sunday and a full marathon two weeks later no problem
A 45y old preparing for his first marathon, only reaching 50k/w recently for the past few weeks ? Well he better have 6-8 weeks between the two if he wants to race both.
Tune-up races are great, but anything too close would be bad (1-2 maybe even 3 weeks) unless you've got crazy good recoveries skill
I'll be following Hal Higdon's Novice 2 plan:
It'll be my first marathon at 39 years old, current mileage is around 20 miles per week while I work on 5K and speed but when I start this marathon plan in December, come February and week 9 I'll be on 30 miles the week before the half marathon race.
I wouldn't say my recovery is particularly great, I'm not getting any younger and it's part of the reason I went for this plan with it being a 4-day running week.
So I could race the half, and that'll give me a good (or at least better) estimate of my fitness at that time and and what my marathon pace should be. Or I could just use the half as a tougher training run where instead of running easy with segments of marathon pace thrown in, I use the 13 miles to actually run at marathon pace throughout and see how I get on.