Twin Documentation
  • Overview
  • Consumer
  • Developer
  • Operations
Dashboard Guide
    Cron JobsMinteo (Minting)Circulacion (Circulation)Uniswap PoolsBridge AdminRewardsSeguimiento de Circulante (Balance Tracking)Oracle Wallets (Configuración)Tokens (CRUD)
Deploy
MonitoringContracts & AddressesTroubleshooting
powered by Zudoku
Dashboard Guide

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 KeyScheduleFunctionNotes
ORACLE_PRICE_UPDATEEvery 5 minFetches prices from Belo API, updates oracle contract on-chainUses BitGo Express for TX signing
MINTING_TX_SYNCEvery 2 minSyncs minting TX states with BitGoOnly syncs source='bitgo' TXs, skips wallet-mints
CIRCULATION_SNAPSHOTDaily (00:00)Takes snapshot of circulating supply for all monitored tokensReads totalSupply and non-circulating wallet balances
UNISWAP_AUTO_REBALANCEEvery 10 minCompares pool price vs oracle, rebalances if deviation exceeds thresholdConfigurable per bot (rebalanceTriggerPercent)
STAKING_REWARDS_DISTDailyDistributes staking rewardsPhase 2, not yet active
BALANCE_TRACKINGEvery 15 minRecords wallet balances for trackingCovers circulation + minting wallets
TOKEN_PRICE_SYNCEvery 5 minSyncs token prices from external sourcesFeeds dashboard price cards
APR_CALCULATIONEvery hourCalculates APR/APY for Uniswap positionsBased on fee revenue and position value
BRIDGE_TX_SYNCEvery 5 minChecks LayerZero message status for pending bridge TXsUpdates bridge_transaction status
SUPPLY_MONITORINGEvery 30 minMonitors total supply changes across chainsAlerts on unexpected changes
WALLET_BALANCE_ALERTEvery 10 minChecks operational wallet balances (gas, etc.)Alerts when below threshold
PENDING_TX_CLEANUPEvery hourCleans up stale pending transactionsMarks 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:

  1. Automatic: The error is cleared automatically on the next successful run (markJobAsRunning clears lastError).
  2. 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.

Last modified on April 29, 2026
Dashboard GuideMinteo (Minting)
On this page
  • Overview
  • Registered Cron Jobs
  • On-Demand Execution
  • Clear Errors