Automated Cron Scheduler

Raw MD
Schedule background workers, reset daily rewards, and send automated notifications without external cron services.

Platform Cron Engine

Bots often need to execute background operations at recurring intervals — such as resetting daily login streaks at midnight, executing pending payouts, or cleaning up expired sessions.

Botlify includes a native Cron Scheduler running at 1-minute intervals. You can configure cron jobs directly in Bot Studio → Variables & Cron.

Supported Crontab Expressions

Expression Frequency Description
* * * * * Every 1 Minute Runs once every minute (minimum platform interval).
*/5 * * * * Every 5 Minutes Standard for transaction monitoring and queue processing.
0 * * * * Hourly Runs at minute 0 of every hour.
0 0 * * * Daily Midnight Runs once per day at 00:00 UTC (ideal for daily bonus resets).

Writing a Standalone Cron Script

Create a dedicated file such as cron_worker.php in your bot's folder:

cron_worker.php
<?php
declare(strict_types=1);

require_once __DIR__ . '/index.php'; // Reuse bot() helper and $db

// Clean up pending transactions older than 24 hours
$stmt = $db->prepare("UPDATE withdrawals SET status = 'expired' WHERE status = 'pending' AND created_at < ?");
$stmt->execute([time() - 86400]);

echo "Cron worker completed successfully at " . date('Y-m-d H:i:s');