Esomeprazole is most beneficial when prescribed for a 4-8 week course. For management of gastric or duodenal ulcers, your physician may prescribe it for up to 6 months. Consult your physician in case you plan to take the medicine for longer than 6 months. To know more, click here.