You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PredictHQ only returns roughly the last 90 days of events, so every day we don't save them is history lost for good. Nothing runs on a schedule today: events and weather only refresh when someone calls the ingest endpoints.
Goal
Events and the weather forecast refresh automatically every day for every hotel, so event history builds up for training and the data behind recommendations stays current.
Scope
Choose where the scheduler runs: an external cron (e.g. GitHub Actions) calling the API, an in-process scheduler, or a Neon cron trigger.
Run the existing no-dates refresh (POST /hotels/{id}/ingest/events and /ingest/weather) for every hotel, at least daily.
Make the schedule easy to change, so events can later run several times a day.
Make failed or stopped runs visible to the team (an alert, or a daily summary).
A README section on what runs when and how to run it by hand.
Considerations
Jobs run inside the API process and die on restart; an external cron survives restarts and is the simplest option.
A request while the same job is already running returns 409; treat that as fine, not a failure.
How often: events should be fresh within hours, but PredictHQ credits are limited. Start daily and measure credit use before running more often.
This is urgent because lost event history can't be recovered. If deployment is slow, run the daily events refresh against a dev database in the meantime.
Acceptance criteria
Events and weather refresh daily for every hotel without anyone calling the API.
A failed run is visible to the team within a day.
A 409 doesn't count as a failure.
Daily PredictHQ credit use is measured and written down.
Activity
[-]Rates refresh by themselves and show when they were last updated[/-][+]Collect events and weather every day[/+]