From 167c4a3847d8886e72f889bf2457c14060d6735f Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 8 Jun 2026 03:15:47 -0500 Subject: [PATCH] infra/cron: multi-segment hc warmup + weekly data-refresh cron Tracks the deployed cron.d files in the repo: - pw-hc-campaign: updated comment to reflect the now multi-segment warmup (revalidation + OIG + NPPES + reactivation + bundle); command unchanged. - pw-hc-refresh (NEW): Mon 06:00 Central weekly data refresh, ~1h before the 07:00 weekday send, so every send uses fresh CMS/OIG status. --- infra/cron/pw-hc-campaign | 10 ++++++---- infra/cron/pw-hc-refresh | 8 ++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 infra/cron/pw-hc-refresh diff --git a/infra/cron/pw-hc-campaign b/infra/cron/pw-hc-campaign index ffe2e37..7670418 100644 --- a/infra/cron/pw-hc-campaign +++ b/infra/cron/pw-hc-campaign @@ -1,5 +1,7 @@ -# Healthcare warmup: import the next overdue-first slice into listmonk-hc and -# keep the Medicare-revalidation campaign running. Mon-Fri only, 7 AM Central -# (host TZ = America/Chicago). Delivery is throttled by pw-hc-rampcap's -# sliding-window cap, sent ONLY via the hc HOT stream (.107-.109). +# Healthcare warmup: import the next slice across ALL active segments +# (revalidation, OIG screening, NPPES, reactivation, bundle) into listmonk-hc +# and keep each campaign running. Mon-Fri only, 7 AM Central (host TZ = +# America/Chicago). Delivery is throttled by pw-hc-rampcap's sliding-window +# cap, sent ONLY via the hc HOT stream (.107-.109). Segment audiences are +# source-grounded: a segment with no matching providers simply imports nobody. 0 7 * * 1-5 deploy cd /opt/performancewest && HC_VERIFIED_CSV=/opt/performancewest/data/hc_warmup_nongoogle.csv python3 scripts/build_healthcare_campaigns_cron.py --start-campaign >> /var/log/pw-hc-campaign.log 2>&1 diff --git a/infra/cron/pw-hc-refresh b/infra/cron/pw-hc-refresh new file mode 100644 index 0000000..6061d2d --- /dev/null +++ b/infra/cron/pw-hc-refresh @@ -0,0 +1,8 @@ +# Healthcare data refresh: weekly re-check of every emailable NPI against the +# live government sources (CMS Revalidation list, OIG LEIE) so warmup sends +# never go stale. Runs Mon 06:00 Central, ~1h before the 07:00 weekday send, +# and propagates fresh status into the channel CSVs the campaign cron reads. +# Takes ~8 min (per-NPI CMS lookups + 15MB OIG download). SAM is opt-in only +# (--sam-pages N); SAM exclusions rarely carry an NPI, so OIG LEIE is the +# NPI-bearing exclusion source for the cross-flag. +0 6 * * 1 deploy cd /opt/performancewest && python3 -u scripts/hc_data_refresh.py >> /var/log/pw-hc-refresh.log 2>&1