<?php
/**
 * DAFTAR CRON JOB TERPUSAT
 * Tambahkan cron baru di array ini. Sistem akan otomatis mengeksekusinya.
 */
$cronRegistry = [
    'check_due' => [
        'name' => 'Cek Tagihan Overdue',
        'file' => __DIR__ . '/cron_check_due.php',
        'schedule' => '30 0 * * *', // Setiap hari jam 00:30
        'description' => 'Mengubah status tagihan unpaid menjadi overdue',
        'icon' => 'bi-calendar-check'
    ],
    'auto_suspend' => [
        'name' => 'Auto Suspend Pelanggan',
        'file' => __DIR__ . '/disable_overdue_customers.php',
        'schedule' => '0 1 * * *', // Setiap hari jam 01:00
        'description' => 'Suspend pelanggan menunggak ke MikroTik',
        'icon' => 'bi-pause-circle'
    ],
    'monthly_bills' => [
        'name' => 'Generate Tagihan Bulanan',
        'file' => __DIR__ . '/generate_monthly_bills.php',
        'schedule' => '0 0 1 * *', // Tanggal 1 jam 00:00
        'description' => 'Generate tagihan otomatis awal bulan',
        'icon' => 'bi-receipt'
    ],
    'release_balance' => [
        'name' => 'Release Saldo Cabang',
        'file' => __DIR__ . '/release_balances.php',
        'schedule' => '5 0 * * *', // Setiap hari jam 00:05
        'description' => 'Release saldo pending cabang (H+5)',
        'icon' => 'bi-cash-stack'
    ],
    'wa_reminder' => [
        'name' => 'WhatsApp Reminder',
        'file' => __DIR__ . '/cron_reminder.php',
        'schedule' => '0 9 * * *', // Setiap hari jam 09:00
        'description' => 'Kirim reminder WA H-3, H-1, dan Hari H',
        'icon' => 'bi-whatsapp'
    ]
];