Every automation that runs on its own for byForja. A "cron" is just the technical word for a scheduled wake-up: a robot = a program + its wake-up. Families below: Cloudflare robots (CRON1-10), n8n robots on the VPS, routines and event triggers.
10-09-2026—UPDATEfunctions/api/admin/workers.js · one brand per page, the other brands list theirs on their own /crons| Worker | Crons attached | Last deploy | Repo | Role |
|---|---|---|---|---|
| Loading the account… | ||||
Lists the intranet pages with no visit in 90 days plus the public paths gone quiet, one email to AL. Same numbers next to every link on /alllinks. Read-only on D1.
tools_visits, fed by the beacon in /assets/bf-theme.js (one hit per page, per browser, per day, never from an iframe) and tools_pages, rewritten at every deploy by scripts/pages-inventory.js.POST /admin/unused-pages-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron. ?dry=1 computes without sending.0 6 1 * * · code: byforja-backup-worker/src/unused-pages.js · worker: https://byforja-backup-worker.alexandre-corne-ac.workers.dev
Archives the previous month of the events table to R2 byforja-backups, then deletes those rows from D1. Backup first: an R2 failure blocks the DELETE, so nothing is lost.
Heads-up — the only cron on this page that DELETEs rows from the live events table (after archiving them to R2, R2-fail-HARD).
events clause.POST /admin/events-archive-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron. Idempotent: the current month is never touched.0 2 1 * * · code: byforja-backup-worker/src/events-archive.js · R2: byforja-backups
Dumps every business table of D1 byforja into a single SQL file (CREATE TABLE plus one INSERT per row) and uploads it to R2 byforja-backups under YYYY-MM/.
POST /run?confirm=YES on the worker, not proxied (backups are launched from the worker only). Same remark as the other endpoints: no token check today.0 3 1 * * · code: byforja-backup-worker/src/index.js · R2: byforja-backups/YYYY-MM/
Fetches byforja.com/sitemap.xml, walks every public page and extracts every clickable element (links, buttons, [role="button"], [data-track-id]). Upserts page_inventory and button_inventory.
POST /admin/page-flow-crawl-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron.0 4 * * 1 · code: byforja-backup-worker/src/page-flow-crawl.js · writes: page_inventory, button_inventory
Builds its baseline from byforja.com/sitemap.xml, crawls each URL and buckets the results: 200 and 3xx are fine, 4xx warn, 5xx and network failures are errors. Mails only when something is off.
POST /admin/url-audit-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron.0 4 1 * * · code: byforja-backup-worker/src/url-audit.js
Counts rows per analytics table and per event type, then writes the snapshot back so the analytics map page reflects reality twice a year.
POST /admin/analytics-map-refresh-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron.0 5 1 1,7 * · code: byforja-backup-worker/src/analytics-map-refresh.js
Reads error_events over the last 24 hours plus the KPI thresholds. Sends one consolidated mail if anything is breached, and stays completely silent otherwise.
POST /admin/error-events-watchdog-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron.0 6 * * * · code: byforja-backup-worker/src/error-events-watchdog.js · reads: error_events
Weekly snapshot: 7 day counters, delta against the previous 7 days, top paths, sent by mail. Runs four hours after the page-flow crawler so the report leans on a fresh inventory.
POST /admin/weekly-snapshot-now?token=… on the worker (ADMIN_TOKEN required since 2026-09-10); the Run now button above goes through the intranet proxy /api/admin/run-cron.0 8 * * 1 · code: byforja-backup-worker/src/weekly-snapshot.js
Sends the outreach follow-up touches T2, T4 and T5. For each prospect with a live sequence it works out which touch is due, checks the prospect's local send window, then runs a dual stop check (a Cal.com booking under their email, or a last message coming from the prospect). Only if all of that clears does it send, inside the existing Gmail thread.
LIVE_SEND = "true" in wrangler.toml and the Gmail secrets. Either one missing means dry run, no exceptions.sendMinuteFor) so no email lands on the hour. The Tuesday/Thursday 08:00 window was dropped, only the 06:00 to 20:00 local window remains (commit 6e033b0).0 * * * *; wrangler.toml, deployed on 2026-09-09 with CRON1, says 3,17,29,43,51 * * * *. The live table at the top of this page shows what the account really carries.POST /admin/gmail-followup-now?token=… on the worker, or the Run now button above (dry run by default; ?force=1 skips the Tuesday and Thursday window and requires the x-admin-token header, same secret).3,17,29,43,51 * * * * · code: byforja-backup-worker/src/gmail-followup.js · secrets: GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REFRESH_TOKEN, CALCOM_API_KEY · var: LIVE_SEND
Video auto-publisher for byForja. The workflow carries a daily schedule trigger but the workflow itself is switched off in n8n, so the trigger never fires. Also reachable through the webhook byforja-videos-trigger.
byforja-videos-trigger
Reads the three CRM databases in Notion, one per vertical, and produces the bi-weekly brief: clients, prospects, leads, with the rows that need attention called out. byForja is one of the three verticals it covers.
0 8 * * 1,4 (Mac local time) · storage: ~/.claude/scheduled-tasks/crm-brief-biweekly/SKILL.md
Cron = Cloudflare Workers cron (byforja-backup-worker, scheduled handler) or a local launchd agent. Deterministic, zero LLM tokens. For mechanical jobs.
Routine = Claude Code scheduled task (~/.claude/scheduled-tasks/<id>/SKILL.md). Spawns a Claude session. Costs tokens. For reasoning jobs.
Event = Application code fired on a user or system event (page load, form submit, webhook). Not scheduled, not LLM.
Active = trigger confirmed live, it fires on its own. Dormant = the code exists, nothing calls it on a schedule. Dead = it ran once, or it will never run again.
What this page is. Every automation that runs on its own for byForja, with the schedule it actually fires on, what it does, the file that holds the code, and whether it is really running. One page like this exists on each of the four intranets, on the EO model (rule 15, Intranet structure, 2026-09-09).
Status is measured, not declared. Every schedule was read back from the Cloudflare schedules API on 27/08/2026, not copied from the wrangler.toml files; the Workers section at the top re-reads the account at every load. n8n came from the n8n REST API. Card count now: 9 crons, 1 routine, 1 n8n, 0 events.
Worker code: ~/Projects/byforja-backup-worker/. Deployed at https://byforja-backup-worker.alexandre-corne-ac.workers.dev.
| What | Value |
|---|---|
| Workers | byforja-backup-worker · Cloudflare account 88ff6259a88cb5fb8e8b9e13e082d7c4 |
| URLs | https://byforja-backup-worker.alexandre-corne-ac.workers.dev · |
| Repos | ~/Projects/byforja-backup-worker/ |
| Crons | 0 6 1 * * (unused-pages) · 0 2 1 * * (events-archive) · 0 3 1 * * (backup) · 0 4 1 * * (url-audit) · 0 4 * * 1 (page-flow-crawl) · 0 5 1 1,7 * (analytics-map-refresh) · 0 6 * * * (error-events-watchdog) · 0 8 * * 1 (weekly-snapshot) · 3,17,29,43,51 * * * * (gmail-followup) — 9 on byforja-backup-worker, read back from the Cloudflare schedules API on 2026-09-09 (unused-pages added that day) on byforja-cron-purge |
| Secrets and vars referenced by the code (names only) | ADMIN_TOKEN · RESEND_API_KEY · BREVO_API_KEY · CALCOM_API_KEY · GMAIL_CLIENT_ID · GMAIL_CLIENT_SECRET · GMAIL_REFRESH_TOKEN · HUNTER_API_KEY · NOTION_API_KEY · ZEROBOUNCE_API_KEY · vars BRAND, LIVE_SEND, NOTIFY_FROM, NOTIFY_TO, SITE_HOST, SITE_ORIGIN, TOOLS_HOST |
| Bindings | D1 byforja (binding DB, both workers) · R2 byforja-backups (binding BACKUP_BUCKET) |
Admin endpoints (POST, ?token= or x-admin-token required since 2026-09-10) | /admin/unused-pages-now · /admin/events-archive-now · /run?confirm=YES (backup) · /admin/page-flow-crawl-now · /admin/url-audit-now · /admin/analytics-map-refresh-now · /admin/error-events-watchdog-now · /admin/weekly-snapshot-now · /admin/gmail-followup-now (?force=1 needs x-admin-token) · dry run GET / (list re-read from src/index.js on 2026-09-09) |
| Manual trigger | POST /admin/<name>-now?token=… on the worker (ADMIN_TOKEN on every /admin/* route since 2026-09-10). The Run now buttons go through the intranet proxy /api/admin/run-cron/<name>, which holds the token as a Pages secret. |