Appearance
Scheduler (cron)
Deposits, wallet balances, staking rewards, funding fees, mini-charts and the process watchers all run on a timer. They're defined in one place, app/Console/Kernel.php, and started by a single cron entry.
The cron entry
Add this line to the crontab of the web server user, so files the tasks create belong to the same user as the website:
bash
sudo crontab -u www-data -etxt
* * * * * cd /var/www/exchange && php artisan schedule:run >> /dev/null 2>&1Every minute, schedule:run checks the list and starts the tasks that are due.
Check it runs
bash
php artisan schedule:listThis lists every task with its next run time. To see that cron really calls it, look for schedule:run in the system log:
bash
grep CRON /var/log/syslog | tailIn the admin panel: System Monitor has a scheduler check, and Market services shows whether the core processes are running. If they never start, the scheduler isn't running (they're started by pm:watcher).
One server only
If you run the platform on several servers, add the cron entry on one of them. Most tasks use withoutOverlapping(), which uses the shared cache to avoid running the same task twice at once, but deposit monitors on two servers would still compete.
Every task by area
Times are in UTC (the platform's timezone). "No overlap" means a new run is skipped while the previous one is still working.
Process watchers
| Command | Runs | What it does |
|---|---|---|
pm:watcher | Every minute | Keeps PM2 in line with config/pm.php: starts missing services (Horizon, Soketi, chart, order processor, stop trigger, bots, liquidity runners, price tracker and, on plan 5, futures, P2P and options), leaves alone services an admin stopped, and restarts workers that stopped responding (no heartbeat). Turn off with PM_SERVICE_WATCHER_ENABLED=false. |
pm:market-watcher | Every minute | Only with PM_LIQUIDITY_MODE=per-market: starts a liquidity process (LIQ-<market>) for every market with liquidity on. In the default shared mode the liquidity-binance / liquidity-custom services do this. Turn off with PM_MARKET_WATCHER_ENABLED=false. |
system-monitor:test --alert | Every 5 minutes | Checks every service and emails the admin address if something is offline. See System Monitor. |
Deposits and withdrawals
| Command | Runs | What it does |
|---|---|---|
deposits:scan <network> | Every minute, one per network | Detects deposits on ETH, ERC-20, BNB, BEP-20, Polygon, MATIC-20, TRX and TRC-20 (every network with a scanner in config/networks.php), and credits the confirmed ones. See Adding a network |
solana:monitor-sol-deposits, solana:monitor-spl-deposits | Every minute | Detects SOL and SPL token deposits |
deposits:sweep <network> | Every 3 minutes, one per network | Moves confirmed deposits from user addresses to the hot wallet on ETH, ERC-20, BNB, BEP-20, Polygon, MATIC-20, TRX, TRC-20, SOL and SPL (each deposit claimed once) |
withdrawals:sync | Every minute | Finishes withdrawals once the network's bridge wrote the transaction (paid out) or marked them failed (refunded once), on every bridge network |
withdrawal:automate | Every 2 minutes | Sends approved withdrawals automatically. Only works when ENABLE_AUTO_WITHDRAWALS=true. |
wallets:payeer-wallet-withdraw-automate, wallets:perfect-money-wallet-withdraw-automate | Every minute | Automatic Payeer and Perfect Money payouts |
bonus:process-deposits | Every minute | Awards deposit bonuses. Only works when DEPOSIT_BONUS_ENABLED=true. |
users:backfill-first-deposit | Every minute | Records the USD value of each user's first confirmed deposit (used for the wallet-transfer fee threshold) |
System wallet balances
These refresh the hot-wallet balances shown in Reports → Wallets.
| Command | Runs |
|---|---|
wallets:ethereum-wallet-balance, wallets:bnb-wallet-balance, wallets:trx-wallet-balance, wallets:btc-wallet-balance, wallets:solana-wallet-balance, wallets:ripple-wallet-balance, wallets:ton-wallet-balance | Every 5 minutes |
wallets:matic-wallet-balance | Every 15 minutes |
wallets:payeer-wallet-balance, wallets:perfect-money-wallet-balance, wallets:fireblocks-balance | Every minute |
Markets and charts
| Command | Runs | What it does |
|---|---|---|
markets:sparklines | Every 2 hours | Rebuilds the 24-hour mini-charts on the Markets page (pages only read the cached result) |
chart:warm-cache --all | Every 5 minutes | Refreshes cached candles for markets that use external chart data (Binance, MEXC or Bybit) |
market-monitor:stats | Daily, 00:00 | Saves bid, ask, high, low and market cap to each market, and resets the 24h high, low and volume of markets without a liquidity provider |
market:last-price-update | Daily, 00:00 | Sets the last price of liquidity-provider markets to Binance's previous close |
market:fiat-currency-rates | Daily, 23:59 | Updates fiat exchange rates (uses CURRENCYAPI_KEY) |
matching-engine:check-sync | Every 5 minutes | If the Rust matching engine is on and lost its order books, reloads them from the database |
cache:prune-stale-tags | Hourly | Cleans up old cache entries in Redis |
Earn, futures and lending
| Command | Runs | What it does |
|---|---|---|
staking:rewards-calculate | Daily, 00:00 | Adds the day's reward to every active stake |
staking:status | Daily, 23:30 | Completes matured stakes and returns principal plus rewards |
launchpad:state-monitor | Every minute | Opens and closes token sales by their dates and caps |
transaction:referral-credits | Every minute | Records multi-level referral commissions and credits them to wallets |
airdrops:distribute | Every minute | Pays airdrops whose payout time has passed |
referrals:evaluate | Hourly at :12 | Recalculates referral tiers of referrers whose friends were active |
referrals:evaluate --all | Daily at 00:35 | Recalculates every referral tier |
futures:funding-fees | Hourly | Charges or pays funding on open futures positions that are due |
lending:interest-taker | Hourly | Charges interest on open loans |
lending:liquidation-watcher | Every minute | Liquidates loans whose collateral fell too far |
margin:interest | Hourly | Charges one hour of interest on open margin loans |
margin:monitor | Every minute | Margin levels, margin calls and liquidation of margin accounts |
orders:trigger-stops | Every minute | Safety net for stop-limit, OCO stop, trailing-stop and TP/SL orders: checks every 3 seconds during the minute, but only while the stop-trigger worker isn't running (that worker reacts within a second of a trade or price move) |
Accounts and notifications
| Command | Runs | What it does |
|---|---|---|
account-levels:evaluate | Hourly at :07 | Recalculates the VIP level of users active in the last 70 minutes |
account-levels:evaluate --all | Daily at 00:20 | Recalculates every user's VIP level |
notifications:prune | Daily at 03:40 | Deletes Notification Center items older than 90 days |
statements:prune | Daily at 03:40 | Deletes account statement files older than 30 days, re-queues statements stuck in Preparing |
queue:prune-failed --hours=168 | Daily at 03:50 | Deletes failed jobs older than a week |
P2P
| Command | Runs | What it does |
|---|---|---|
peer-order-appeal:watcher | Every minute | Notifies the admin about new P2P appeals |
peer-order:profile-stats | Every 5 minutes | Updates P2P merchant statistics (completion rate, order counts) |
Expired P2P orders are cancelled by the peer-order-processor PM2 process, not by the scheduler.
Merchant payments
The merchant module schedules most of these itself (MerchantServiceProvider), so they appear in schedule:list but not in Kernel.php; only merchant:process-webhooks is in Kernel.php. Each runs once per interval.
| Command | Runs | What it does |
|---|---|---|
merchant:monitor-deposits, merchant:monitor-btc-deposits | Every minute | Detects payments to merchant invoices |
merchant:sync-transfers | Every minute | Finishes payouts, refunds and collections from bridge results |
| Invoice expiry check (job) | Every minute | Expires unpaid invoices |
| Pending webhooks (job) | Every minute | Sends queued merchant webhooks |
| Asset rates refresh (job) | Every 30 seconds | Updates the rates used to price invoices |
merchant:collect-funds | Every 5 minutes | Collects paid invoice funds |
merchant:process-webhooks --pending --retry | Every minute | Sends and retries webhooks to merchants |
merchant:process-payouts --limit=10 | Every 2 minutes | Sends approved merchant payouts |
merchant:process-refunds --limit=10 | Every 2 minutes | Sends approved refunds |
Card on-ramp
| Command | Runs | What it does |
|---|---|---|
unlimit:sync-config | Every 15 minutes | Refreshes the Unlimit (GateFi) currency list. Does nothing unless UNLIMIT_ENABLED=true. |
Read-only (demo) mode
When READ_ONLY_MODE=true, the scheduler runs only pm:watcher, pm:market-watcher and markets:sparklines. Deposit detection, rewards and every other task are skipped. Never enable read-only mode on a live exchange.
Running a task by hand
Any task can be run directly, which is useful to test it or to catch up after downtime:
bash
php artisan markets:sparklines
php artisan staking:status
php artisan deposits:scan erc20The output prints to your terminal. Run commands as the web server user so that log and cache files keep the right owner:
bash
sudo -u www-data php artisan markets:sparklinesTo run everything that's due right now, once: php artisan schedule:run. All custom commands are listed in Artisan commands.
Fill the mini-charts after installing
The Markets page mini-charts appear after the first markets:sparklines run (every 2 hours). To fill them at once with real prices from Binance, MEXC or Bybit, run php artisan markets:sparklines-seed.
