dlq-depth-probe | housekeeping | Sweep the dead-letter queue: alert once for each new entry, remove entries older than 14 days and failed jobs older than 30, and alert when the depth crosses a threshold. |
job-heartbeat-probe | housekeeping | Detect jobs whose heartbeat went silent; mark them stuck. |
reconcile-orphaned-user-jobs | housekeeping | Sweep stuck running user-job rows whose worker process died. |
reconcile-pending-credentials | housekeeping | Sweep stuck pending integration-credential rows (UI flow interruptions). |
holding-cache-due | housekeeping | Rewrite a holding’s cached balance once evidence dated after its last write has happened, such as a statement’s last row printed in a time zone east of UTC. |
pricing | hourly | Fetch a current price, against USD, for every held token a provider prices, every currency in use, the routing hubs and the FX baseline. Every run asks the providers; no stored row is reused. A stock is asked only while its exchange is open (US and Toronto, 10:00-16:00 local, weekdays) and FX only in the 23:00Z hour; every token is asked in the 23:00Z hour, and one never priced or last priced over a day ago is asked at once. |
wallet-balances | hourly | Re-sync on-chain wallet balances across Etherscan, Helius, Bitcoin, Tron, TON. For Bitcoin, Solana and every Etherscan chain it also reads the ledger since its read-through point and writes both in one transaction, so a balance never lands without the rows that explain it (SC-1665). A user with no session in 7 days, on an account older than 7 days, is synced only in the 00, 06, 12 and 18 UTC runs; opening the app re-fetches their balances at once (users.appOpened). |
exchange-balances | hourly | Re-sync exchange holdings for every connected exchange integration. For Airwallex, Kraken, Bybit, OKX, KuCoin, Bitget and IBKR it also reads the ledger since its read-through point and writes both in one transaction (SC-1665); IBKR’s two reads share one Flex statement. A user with no session in 7 days, on an account older than 7 days, is synced only in the 00, 06, 12 and 18 UTC runs; opening the app re-fetches their balances at once (users.appOpened). |
stale-sync-probe | hourly | Detect active, credentialed integrations that have silently stopped syncing — stale lastSync or zero accounts — and escalate. Fires on ENTERING that condition, not on every probe that observes it. operator_alarms holds which conditions are already open: entering escalates, recovery deletes the row and is logged rather than escalated, and a condition still true after STALE_SYNC_RENOTIFY_MS (7 days) is re-stated as a distinct event so it cannot go silent forever. A per-probe alarm is not merely noisy — it outnumbers every low-frequency signal the service produces and makes a once-a-day failure unreadable for as long as it lasts. Re-entry after a recovery is a fresh escalation, which is why this is a ledger rather than a rate limit or a grouping rule. |
categorize-transactions | hourly | First, for every user, a fee, interest, dividend or reward with no payee text takes the person’s category named Bank fees, Interest, Dividends or Income, marked kind; no AI and nothing sent. Then AI category suggestions, for each person who turned them on in Settings (users.ai_categories_at); nobody else’s data is sent. Each payee key that no learned rule covers is asked once, up to 50 a call within that person’s 5 calls a day, and the answer is remembered in transaction_category_ai_answers. Only uncategorized rows are written, marked ai. A person’s failure is logged and the next person still runs. |
payment-due-reminder | hourly | One Web Push a day at ~17:00 in each user’s own local time, summarising the payments due on their local tomorrow as a count and a per-currency total. Fires hourly and selects only the users for whom it is currently 17:00 locally — a single daily fire happens at one UTC hour, and one UTC hour is a different clock time in every zone. A user whose users.timezone is still NULL is SKIPPED, never defaulted to UTC, and counted in the job’s log line. Nothing is sent on a day with nothing due. Needs VAPID_SUBJECT / VAPID_PUBLIC_KEY / VAPID_PRIVATE_KEY; without them the job logs a refusal on every fire and sends nothing. |
apy-payouts | nightly | Apply accrued interest to holdings with an APY config due for payout. |
exchange-transactions | nightly | Refresh the transaction ledger for every connected exchange/broker/bank integration whose ledger is not read with its balance — fans out a transaction-import per account with a 30-day rolling window. A balance gap on one of those sources waits for this run (awaiting-ledger, at most 26 hours). |
backfill-token-identity | nightly | Sundays only. Re-enrich tokens whose providerMetadata hasn’t been touched lately. |
rescore-scam-tokens | nightly | Recompute is_scam_probability for crypto tokens whose scam_score_version is stale, so a change to the scoring heuristic reaches tokens already stored. Non-crypto tokens are unscored and never enter the population; rows marked by a person are never recomputed. |
historical-price-backfill | nightly | Fill price history for tokens with holdings: each missing past UTC day’s close as a daily row at 23:59:59.999 UTC, and today’s price, or a point the provider does not date to a day, as an intraday row at its own instant; respects unpriceableUntil cooldown. |
transfer-linking | nightly | Pair CEX withdrawals with wallet deposits via LinkTransferPairsUseCase. |
portfolio-value-rollup | nightly | Recompute portfolio_value_daily for every user at user / institution / account / holding scope. |
hide-closed-holdings | nightly | Auto-hide holdings that have been at zero balance for the configured window. |
split-holding-probe | nightly | Find upstream events recorded against more than one holding of the same (account, token) and escalate to Sentry. holding_tx_dedup is unique per holding, so a position split across two rows can carry the same event twice with no constraint objecting, and every per-holding reconciliation still passes (SC-239). Reads only; runs after the rollup in the nightly group, so it audits the day’s settled state rather than racing it. |
payment-horizon-roll | nightly | Advance the forward edge of every active payment’s materialised schedule to twelve months out. Occurrences are generated when a payment is created, has its amount changed, or is resumed — all writes — so before this job existed an untouched payment kept whatever edge its last write gave it and lost a month of its own future every month. Near-term reads were unaffected; a year-long read tapered toward zero at a different month per payment, which reads as a book of bills ENDING rather than as missing rows (SC-622). Paused payments are skipped deliberately (their edge stops until resume, which fills the pause window itself), as are ended ones. Insert is ON CONFLICT DO NOTHING per (payment_id, due_date), so a retry writes nothing twice. |
backfill-counterparty | nightly | Extract a counterparty + description onto holding_transactions rows that predate the per-provider extractors. |
engine-shadow | nightly | Foundation shadow (A1): compute every holding’s balance with the new engine beside today’s stored balance, now and 7 and 30 days back; then (A4) compare every visible holding’s cached value (holdings.value_base) with the live valuation. It stores each difference with a cause category in engine_shadow_differences. Writes only its report tables. A failed attempt is retried, and a retry runs only the kinds no earlier attempt recorded. Removed at the flip (A5). |
db-backup | nightly | pg_dump --format=custom of the whole database, uploaded to the archive bucket named by BACKUP_BUCKET and verified by reading the object back and comparing a sha256. Runs as the nightly group’s last step, every night, whatever failed or timed out before it, so it captures a settled state rather than racing the rollup. The heartbeat probe reports to Sentry when it has not completed by 07:00 UTC. The archive is checked with pg_restore --list before upload: an archive that cannot be listed cannot be restored, and one that is uploaded anyway looks like protection. Needs pg_dump/pg_restore 16 in the runtime image (apps/backend/worker/Dockerfile) — a client older than the server refuses outright — plus BACKUP_BUCKET and the S3_* storage credentials; without them the job logs a refusal on every fire and writes nothing. |
alert-sweep | morning | Evaluate the named alert rules and email each affected account at most once per fault. Today there is one rule, integration-stale: an active, credentialed integration whose accounts have not synced for ALERT_STALE_SYNC_HOURS (default 24), or which has never produced an account at all. Same signal as stale-sync-probe above, at a far looser threshold and pointed at the USER rather than at Sentry — 3h is two missed cycles and the right moment to page us, and the wrong moment to mail somebody about a blip. One letter per account however many connections it names, and it names only the ones this run claimed, never everything still broken. alert_deliveries is what makes that true across a BullMQ retry; a row is deleted when the integration syncs again, so a fault that recurs alerts a second time. Unverified addresses and accounts that opted out are never claimed for. Every letter carries a one-click, no-login unsubscribe (GET /e/a/:token on the api) that is SEPARATE from the digest’s. Needs FRONTEND_URL + BACKEND_URL on the worker; without them the job logs a refusal on every fire and sends nothing. |
activation-nudge | morning | Off unless ACTIVATION_NUDGE_ENABLED=1; every other fire logs that it skipped. One email, ever, to a verified account that signed up at least three days ago and has added no account and no holding. Each account is claimed in users.activation_nudge_sent_at before the send, so a retry or an overlapping fire never sends twice; a failed send gives the claim back and is counted, so the next day tries again. Written in the language the account last signed in with (users.language), English when none is recorded. Every letter carries a one-click, no-login unsubscribe (GET /e/n/:token on the api), separate from the digest’s and the alerts’, and links the privacy policy. Needs FRONTEND_URL, BACKEND_URL and PRIVACY_URL on the worker; without them the job logs a refusal and sends nothing. |