Cron Jobs
Access: Dashboard sidebar > Cron Jobs
Overview
The Cron Jobs page displays a DataGrid table of all registered cron jobs, sorted by createdAt ascending. Each row shows the job name, schedule (cron expression), last run time, last error (if any), and status.
Registered Cron Jobs
| Job Key | Schedule | Function | Notes |
|---|---|---|---|
| ORACLE_PRICE_UPDATE | Every 5 min | Fetches prices from Belo API, updates oracle contract on-chain | Uses BitGo Express for TX signing |
| MINTING_TX_SYNC | Every 2 min | Syncs minting TX states with BitGo | Only syncs source='bitgo' TXs, skips wallet-mints |
| CIRCULATION_SNAPSHOT | Daily (00:00) | Takes snapshot of circulating supply for all monitored tokens | Reads totalSupply and non-circulating wallet balances |
| UNISWAP_AUTO_REBALANCE | Every 10 min | Compares pool price vs oracle, rebalances if deviation exceeds threshold | Configurable per bot (rebalanceTriggerPercent) |
| STAKING_REWARDS_DIST | Daily | Distributes staking rewards | Phase 2, not yet active |
| BALANCE_TRACKING | Every 15 min | Records wallet balances for tracking | Covers circulation + minting wallets |
| TOKEN_PRICE_SYNC | Every 5 min | Syncs token prices from external sources | Feeds dashboard price cards |
| APR_CALCULATION | Every hour | Calculates APR/APY for Uniswap positions | Based on fee revenue and position value |
| BRIDGE_TX_SYNC | Every 5 min | Checks LayerZero message status for pending bridge TXs | Updates bridge_transaction status |
| SUPPLY_MONITORING | Every 30 min | Monitors total supply changes across chains | Alerts on unexpected changes |
| WALLET_BALANCE_ALERT | Every 10 min | Checks operational wallet balances (gas, etc.) | Alerts when below threshold |
| PENDING_TX_CLEANUP | Every hour | Cleans up stale pending transactions | Marks as failed after timeout |
On-Demand Execution
Each cron job can be executed on-demand from the dashboard by clicking the "Run Now" button on the job row. This triggers the same handler that the scheduled execution would run. Useful for testing or forcing an immediate update.
The on-demand handler is registered in dashboard/src/cron-handlers.ts.
Clear Errors
When a cron job fails, the lastError field stores the error message. Errors can be cleared in two ways:
- Automatic: The error is cleared automatically on the next successful run (
markJobAsRunningclearslastError). - Manual: Click the X button on the error cell in the UI, which calls
PUT /api/cron-job/clear-error/:id.
Known quirk: Objection.js treats undefined as "skip this field" rather than setting it to null. The cron service patches around this by explicitly converting undefined values to null before saving.