diff options
| author | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-06-04 20:26:33 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-06-04 20:26:33 +0900 |
| commit | f9cc6d3f2dc884739ea640ef54adaeb35d117220 (patch) | |
| tree | f12a93e27bb316546a9e63f27068aa11b077c6d7 | |
| parent | e998e12aa5c07d923d91ff8e3d48867ec66d5b48 (diff) | |
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 <noreply@anthropic.com>
| -rw-r--r-- | Dockerfile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |
