Operations & Cron Jobs
All scheduled tasks and recurring automation required to run this site.
Cron API Endpoints
HTTP POST endpoints for Jenkins or any external scheduler. All require an X-API-Key header matching the CRON_API_KEY environment variable.
Generate Daily Questions
ActiveGenerates 10 daily questions from current news headlines using AI.
0 12 * * * (Daily at 12:00 UTC)POST /api/cron/generate-daily-questionsRequires X-API-Key header with CRON_API_KEY value.
Generate Crisis Questions
ActiveGenerates 100 crisis-related questions using AI for users in difficult situations.
0 12 * * * (Daily at 12:00 UTC)POST /api/cron/generate-crisis-questionsRequires X-API-Key header.
Generate Trending Questions
ActiveGenerates 10 trending seasonal/topical questions from current news.
0 12 * * * (Daily at 12:00 UTC)POST /api/cron/generate-trending-questionsRequires X-API-Key header.
Generate Question Categories
ActiveCategorizes uncategorized questions using AI.
0 12 * * * (Daily at 12:00 UTC)POST /api/cron/generate-question-categoriesRequires X-API-Key header.
Build Question Categories
ActiveRebuilds the question category index from all categorized questions.
0 12 * * * (Daily at 12:00 UTC)POST /api/cron/build-question-categoriesRequires X-API-Key header.
Activate Scheduled Questions
ActiveActivates questions that are scheduled for today across all audience segments.
0 6 * * * (Daily at 6:00 AM UTC)POST /api/cron/activate-scheduled-questionsRequires X-API-Key header.
Deploy Daily Questions
ActiveSelects one question per audience segment (16 total) and schedules them for tomorrow.
0 6 * * * (Daily at 6:00 AM UTC)POST /api/cron/deploy-daily-questionsRequires X-API-Key header.
Generate Segmented Questions
ActiveGenerates new segmented questions for specified audience(s). Accepts ?audience= and ?count= params.
Every 10 daysPOST /api/cron/generate-segmented-questions?audience=all&count=30Requires X-API-Key header. Audience: all, children, teens, college, parents, seniors, theologians, new-believers, young-professionals, empty-nesters, marketplace-leaders, single-adults, creative-professionals, blue-collar, military, healthcare, pastors.
Process Email Sequences
ActiveProcesses pending email sequences: onboarding, topic follow-ups, crisis care check-ins, weekly digests, and re-engagement emails.
0 14 * * * (Daily at 2:00 PM UTC)POST /api/cron/process-email-sequencesRequires X-API-Key header. Supports ?dry_run=true.
Legacy GitHub Actions Workflows
These ran as GitHub Actions and have been replaced by the API endpoints above. All are set to workflow_dispatch (manual trigger only).
Generate Questions (Legacy)
DisabledLegacy GitHub Actions workflow. Replaced by /api/cron/* endpoints above.
0 12 * * * (Daily at 12:00 UTC)npm run script:generate-daily-questions && ...Workflow: .github/workflows/generate-questions.yml.
Deploy Segmented Questions (Legacy)
DisabledLegacy GitHub Actions workflow. Replaced by /api/cron/* endpoints above.
0 6 * * * (Daily at 6:00 AM UTC)npm run script:activate-scheduled-questions && npm run script:deploy-daily-questionsWorkflow: .github/workflows/deploy-segmented-questions.yml.
Process Email Sequences (Legacy)
DisabledLegacy GitHub Actions workflow. Replaced by /api/cron/* endpoints above.
0 14 * * * (Daily at 2:00 PM UTC)npx tsx app/scripts/process_email_sequences.tsWorkflow: .github/workflows/email-sequences.yml.
Build & Push to ECR
DisabledBuilds the Docker image and pushes versioned + latest tags to AWS ECR.
On push to maindocker build + push to AWS ECRWorkflow: .github/workflows/main.yml. Currently manual-trigger only.
Server-Side Intervals
These run automatically inside the Node.js process via setInterval. No external configuration needed.
Rate Limit Store Cleanup
ActiveCleans up expired rate limit entries from the in-memory store to prevent memory leaks.
Every 5 minutessetInterval in app/.server/middleware/rateLimit.tsRuns automatically when the server is running. No external configuration needed.
Related Questions Cache Cleanup
ActiveRemoves expired cache entries from MongoDB to keep the related questions cache fresh.
Every 30 minutessetInterval in app/.server/dao/RelatedQuestionsCache.tsRuns automatically when the server is running. No external configuration needed.
Email Sequences (Event-Driven)
These are triggered by user actions and processed by the Process Email Sequences cron endpoint above. Defined in app/.server/services/EmailSequenceEngine.ts.
Onboarding Sequence
Trigger: User signup
Topic Follow-up
Trigger: User answers a question
Crisis Care
Trigger: Crisis keyword detected in user input
Re-engagement
Trigger: User inactivity detected
Quick Reference
| Job | Schedule | Type | Status |
|---|---|---|---|
| Generate Daily Questions | 0 12 * * * (Daily at 12:00 UTC) | API Endpoint | Active |
| Generate Crisis Questions | 0 12 * * * (Daily at 12:00 UTC) | API Endpoint | Active |
| Generate Trending Questions | 0 12 * * * (Daily at 12:00 UTC) | API Endpoint | Active |
| Generate Question Categories | 0 12 * * * (Daily at 12:00 UTC) | API Endpoint | Active |
| Build Question Categories | 0 12 * * * (Daily at 12:00 UTC) | API Endpoint | Active |
| Activate Scheduled Questions | 0 6 * * * (Daily at 6:00 AM UTC) | API Endpoint | Active |
| Deploy Daily Questions | 0 6 * * * (Daily at 6:00 AM UTC) | API Endpoint | Active |
| Generate Segmented Questions | Every 10 days | API Endpoint | Active |
| Process Email Sequences | 0 14 * * * (Daily at 2:00 PM UTC) | API Endpoint | Active |
| Rate Limit Store Cleanup | Every 5 minutes | Server Interval | Active |
| Related Questions Cache Cleanup | Every 30 minutes | Server Interval | Active |
| Generate Questions (Legacy) | 0 12 * * * (Daily at 12:00 UTC) | GitHub Action | Disabled |
| Deploy Segmented Questions (Legacy) | 0 6 * * * (Daily at 6:00 AM UTC) | GitHub Action | Disabled |
| Process Email Sequences (Legacy) | 0 14 * * * (Daily at 2:00 PM UTC) | GitHub Action | Disabled |
| Build & Push to ECR | On push to main | GitHub Action | Disabled |