====== Cron Engine & Scheduling ====== ===== Overview ===== The LEAST cron engine runs background jobs on configurable schedules. All schedules are stored in the **CronSchedule** database table and managed through the web UI — no direct crontab editing is required for application jobs. Navigate to the **Cron Engine Canvas** (''system/workflow_cron.php'') for all cron-related tools. ===== Cron Schedules ===== **Cron Schedule** (''system/cron_schedule.php'') lists all configured jobs: * Enable or disable individual schedules using the toggle * View: last run time, next scheduled run, frequency, and status * **Create Schedule** — add a new job with a standard or custom cron expression (e.g. ''0 2 * * *'' = daily at 2am) * **Edit Schedule** — change the frequency, enable/disable, or update parameters ===== Key Scheduled Jobs ===== ^ Job ^ Frequency ^ Purpose ^ | Metric Snapshot | Daily | Captures platform-wide engagement metrics for trend analysis | | Badge Processing | Daily | Issues queued Open Badge assertions | | Email Digest | Weekly | Sends engagement summary reports to educators | | PHP Health Checks | Weekly | Runs 12 platform health verifications; emails report | | Audit Cron | Configurable | Aggregates audit log data for analytics | | EKOS Review | Weekly | Runs AI classification suggestions for untagged lessons | ===== Cron Queue ===== **Cron Queue** (''system/cron_queue.php'') shows all job executions: * **Pending** — scheduled to run, not yet started * **Running** — currently executing * **Completed** — finished successfully * **Failed** — errored; check the log for details ===== Cron Logs ===== **Cron Logs** (''system/cron_logs.php'') provides the full execution history: * Start time, end time, and duration per execution * Output/error details for failed runs * Filter by job name or date range ===== Email Queue ===== **Email Queue** (''system/cron_email_queue.php'') shows pending email jobs: * Each row is one email delivery task * Status: Pending, Sent, Failed * Click a row to view the full email content and delivery attempt log ===== Email Templates ===== **Email Templates** (''system/cron_email_templates.php'') manages the template library for system emails: * Templates use ''{{variable}}'' placeholders substituted at send time * Edit HTML and plain-text versions * Preview a template before saving Common template variables: ''{{user_name}}'', ''{{lesson_title}}'', ''{{badge_name}}'', ''{{site_name}}'', ''{{action_url}}'' ===== Social Posting Queue ===== **Social Posts** (''system/cron_social_posts.php'') manages scheduled social media content: * View pending posts and their target platform and schedule * Cancel or reschedule a post * View post history and delivery status **Social Accounts** (''system/cron_social_accounts.php'') — connected platform credentials. **Social Platforms** (''system/cron_social_platforms.php'') — available plugin integrations.