mirror of
https://github.com/vinta/awesome-python.git
synced 2026-08-04 15:05:39 +00:00
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:
parent
f6514ef0f4
commit
66bad6b867
4 changed files with 32 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
2
farm-aggregator/scripts/run-daily.js
Normal file
2
farm-aggregator/scripts/run-daily.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { runDaily } from '../jobs/digest.js';
|
||||
runDaily().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });
|
||||
2
farm-aggregator/scripts/run-pulse.js
Normal file
2
farm-aggregator/scripts/run-pulse.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { runPulse } from '../jobs/pulse.js';
|
||||
runPulse().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });
|
||||
2
farm-aggregator/scripts/run-weekly.js
Normal file
2
farm-aggregator/scripts/run-weekly.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { runWeekly } from '../jobs/digest.js';
|
||||
runWeekly().then(() => process.exit(0)).catch((e) => { console.error(e); process.exit(1); });
|
||||
Loading…
Add table
Add a link
Reference in a new issue