Roast legs for 2 hours, covered, then remove skillet from oven and transfer duck legs to a cutting board or plate. Place skillet back on the stove over medium heat. Add garlic head(s), cut side down, to the pan, and cook undisturbed for 5 minutes, until beginning to brown and caramelize; take garlic head(s) out and set aside. Add the minced rosemary to the pan and cook, stirring until fragrant, about 1 minutes. Stir in the cranberry mixture and cook for 2-3 minutes. Turn the heat off and nestle the duck back in, add the garlic head(s), cut side up, the rosemary sprigs on top and slide the pan back into the oven, uncovered.