feat(farm-aggregator): switch to Render free cron jobs (3 services)

Replaces the persistent web service with 3 separate Render Cron Job
services — pulse (hourly), daily digest (06:00), weekly summary (Mon 06:00).
Each job runs and exits, no $7/mo web service needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBD2dN2KEjzz3UQFa9hEpu
This commit is contained in:
Claude 2026-06-28 06:25:33 +00:00
parent f6514ef0f4
commit 66bad6b867
No known key found for this signature in database
4 changed files with 32 additions and 13 deletions

View file

@ -1,14 +1,13 @@
services:
- type: web
name: farm-aggregator
- type: cron
name: farm-pulse
runtime: node
rootDir: farm-aggregator
buildCommand: npm install
startCommand: node index.js
plan: starter
envVars:
- key: NODE_ENV
value: production
startCommand: node scripts/run-pulse.js
schedule: "0 * * * *"
plan: free
envVars: &env
- key: ANTHROPIC_API_KEY
sync: false
- key: AGREFINE_API_URL
@ -37,9 +36,23 @@ services:
sync: false
- key: TOMTOM_API_KEY
sync: false
- key: PULSE_SCHEDULE
value: "0 * * * *"
- key: DAILY_SCHEDULE
value: "0 6 * * *"
- key: WEEKLY_SCHEDULE
value: "0 6 * * 1"
- type: cron
name: farm-daily-digest
runtime: node
rootDir: farm-aggregator
buildCommand: npm install
startCommand: node scripts/run-daily.js
schedule: "0 6 * * *"
plan: free
envVars: *env
- type: cron
name: farm-weekly-summary
runtime: node
rootDir: farm-aggregator
buildCommand: npm install
startCommand: node scripts/run-weekly.js
schedule: "0 6 * * 1"
plan: free
envVars: *env

View file

@ -0,0 +1,2 @@
import { runDaily } from '../jobs/digest.js';
runDaily().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });

View file

@ -0,0 +1,2 @@
import { runPulse } from '../jobs/pulse.js';
runPulse().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });

View file

@ -0,0 +1,2 @@
import { runWeekly } from '../jobs/digest.js';
runWeekly().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });