Scheduler

Review recurring task guidance and run support tasks from a focused scheduler page.

Use this page to review recommended recurring tasks, execute support commands and inspect task output without system-default controls crowding the same workspace.

Password Login

Use your mobile number and saved password for everyday sign-in or reset the password here if needed.

Use password login for everyday access and use Forgot Password when you need to reset credentials.
No active profile loaded yet.
Billing

No billing alert

Billing alerts will appear here when your active scope has generated, due, overdue or blocked platform invoices.

Access Needed

This page requires platform settings access. Sign in with an allowed platform account to manage scheduler settings.

Scheduler Guide

Use this page for recurring maintenance guidance and manual support commands. System defaults now live on a separate page.

Cron / Task Scheduler

This project runs recurring maintenance through CLI scripts in api/tools. On Windows use Task Scheduler; on the VPS use cron.

Scheduler guidance will appear here after the page loads.

Recommended Main Job

Run the combined background worker on a short recurring interval so queued scans, rollups, notifications, guardian snapshots and report emails keep moving.

Suggested frequency
Loading...
Loading...

Optional Execute Mode

Use execute flags only after you are comfortable with the dry-run output. This version actually marks stale devices inactive and archives eligible rows.

Suggested frequency
Loading...
Loading...

Recommended Production Cron Plan

Keep production simple: schedule the combined worker, billing sweep and one archive job. Treat the rest as manual support unless traffic grows enough to split workers.

VPS cron guidance
Job Run Interval Max Runtime Command / Script Why
Background workers Every 1 minute 2-5 minutes php api/tools/run_background_workers.php 100 Processes queued attendance scans, notification fanout, Firebase delivery, attendance rollups, guardian bootstrap snapshots and queued report emails.
Billing sweep Daily, off-peak 5-10 minutes php api/tools/run_billing_jobs.php --execute Generates platform and attendee invoices, sends billing reminders, applies grace-period restrictions and restores access after payment.
Hot-path archive Daily or weekly, off-peak 10-20 minutes php api/tools/archive_hot_path_data.php 1000 Moves old notifications, audit logs and payments out of hot tables. Attendance rows are marked archived but kept in source for reporting safety.
Queue health snapshot Optional, every 15-30 minutes Under 1 minute php api/tools/queue_health_summary.php Read-only health check for queue depth and lag. Useful if you pipe the output into monitoring.
Warehouse export Optional, nightly 10-30 minutes php api/tools/export_operational_warehouse_batch.php attendance_records Only needed if you are exporting operational data to files or a separate analytics/warehouse process.
Suggested cleanup: if run_background_workers.php is scheduled every minute, remove separate crons for process_pending_notifications.php, process_notification_campaigns.php, process_attendance_scan_ingest.php, process_attendance_rollups.php, prewarm_guardian_bootstrap_snapshots.php and process_report_jobs.php unless you intentionally split workers for high traffic.

Monthly Maintenance

These are good monthly checks because they validate platform health without adding noise to the daily scheduler.

Run off-peak
Job Suggested Cron Command / Script Action
Schema drift check Monthly, after backup php api/tools/check_schema_drift.php Confirms the live database still matches schema.sql. Review output manually before applying any changes.
Missing index preview Monthly, after schema drift check php api/tools/generate_missing_index_sql.php Generates index SQL only. Do not auto-apply from cron; review first because indexes can lock busy tables.
Stale device cleanup Monthly, off-peak php api/tools/cleanup_stale_devices.php 1000 --execute Marks old notification device tokens inactive so Firebase delivery does not keep retrying dead devices.
IPEMIS location sync Monthly or on demand php api/tools/import_ipemis_locations.php Refreshes division, district, upazila and union data. Keep manual if the upstream source is unreliable.
Reporting validation Monthly, if read replica/warehouse is used php api/tools/shadow_reporting_validation.php Compares reporting counts between write and read paths so stale reporting data is caught early.
Do not run monthly: load-test scripts, schema reset scripts, peak-hour simulation, role catalog sync, migration validation and rollup rebuilds. Keep those manual and run them only during testing, deployments or data repair.

Archive Readiness

Dry-run counts for operational rows that are eligible for archival under current retention settings.

Not loaded
Area Retention Eligible Status Notes
Archive readiness will appear here after the page loads.

Manual Support Commands

These are useful for manual checks, debugging or one-off support tasks. Do not schedule load tests, schema reset, schema drift, index generation, catalog sync or migration validation as production cron jobs.

Task Suggested Use Command Test
Scheduler support commands will appear here after the page loads.