From f9cc6d3f2dc884739ea640ef54adaeb35d117220 Mon Sep 17 00:00:00 2001 From: yyamashita Date: Thu, 4 Jun 2026 20:26:33 +0900 Subject: Fix cron PATH: use absolute path for node in /etc/cron.d/scraper cron runs with a minimal PATH that excludes /usr/local/bin, causing 'node: not found' errors for both scrape and recap jobs. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9eab66d..9d7f8d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,8 +38,8 @@ COPY app ./app COPY tsconfig.json ./ RUN apt-get update && apt-get install -y cron && rm -rf /var/lib/apt/lists/* RUN printf '%s\n%s\n' \ - '0 */6 * * * root cd /app && DB_PATH=/app/data/events.db node --import tsx/esm scripts/scrape.ts >> /app/data/scraper.log 2>&1' \ - '0 23 * * * root cd /app && DB_PATH=/app/data/events.db node --import tsx/esm scripts/send-recap.ts >> /app/data/recap.log 2>&1' \ + '0 */6 * * * root cd /app && DB_PATH=/app/data/events.db /usr/local/bin/node --import tsx/esm scripts/scrape.ts >> /app/data/scraper.log 2>&1' \ + '0 23 * * * root cd /app && DB_PATH=/app/data/events.db /usr/local/bin/node --import tsx/esm scripts/send-recap.ts >> /app/data/recap.log 2>&1' \ > /etc/cron.d/scraper \ && chmod 0644 /etc/cron.d/scraper RUN mkdir -p /app/data -- cgit v1.2.3