Learn / Fixes
How to keep a product feed fresh
A stale product feed is worse than no feed at all, because an absent feed sends an agent to your pages while a stale one gives it a fast, confident, incorrect answer it has no reason to double check. Freshness is therefore a property to monitor rather than a job to schedule, and the failure is silent: the URL still resolves and the file still parses.
This is stale feed, and it is a failure with no symptoms.
Refresh on change, not on a clock
A nightly rebuild guarantees that your feed is wrong for up to a day every time a price moves. For most stores the events that should trigger a rebuild are few and easy to name: a price change, a stock movement across the in stock boundary, a product added or retired, a policy change that the feed carries.
Make those events trigger the rebuild and keep the scheduled job as a backstop for whatever the events miss.
Monitor the data, not the request
The check most stores have is that the feed URL returns successfully. That passes for months after the generator has quietly stopped, because a stale file serves perfectly well.
Monitor the age of the contents instead: the newest timestamp in the file, the count of items against your catalogue, and a spot check of one price you changed recently. Those three catch every version of this that matters.
Decide what is authoritative
Your feed and your product pages will disagree eventually. Pick one as authoritative, make the other follow, and write the decision down so the next person does not reverse it. See how to expose stock availability to agents.
The failure that costs both ways
Understating a price loses you margin when the shopper arrives expecting the lower number. Overstating it loses the comparison outright, and you never hear about that one.
The second is the more common and the more expensive, because it is invisible. Nothing in your analytics records a comparison you were dropped from. See how often should you test.
Questions
How often should the feed rebuild?
Fast enough that its answers are right when read. Tie it to change rather than to a clock: a price edit or a stock movement should trigger a rebuild, and a nightly job should be the backstop rather than the mechanism.
How would I know if it had stopped updating?
You would not, without a check, which is the whole problem. The file still resolves and still parses. Monitor the age of the data inside it rather than whether the request succeeded.
What if the feed and the product page disagree?
Decide which is authoritative and make the other match. An agent that sees both has no way to know which you meant, and it will not fetch your page to check a feed it already read.