<?php
namespace GriffinForms\Includes\Schedulers;

use GriffinForms\Traits\Singleton;


class ProcessScheduler
{
    use Singleton;

    /**
     * Registers all plugin-level background schedulers.
     */
    public static function register()
    {
        // Register email-related schedulers
        $email_scheduler = EmailScheduler::getInstance();
        $email_scheduler->register();

        // Register file cleanup scheduler (temp file janitor)
        $file_cleanup = FileCleanupScheduler::getInstance();
        $file_cleanup->register();

        // Register rate limit cleanup scheduler
        $rate_limit_cleanup = RateLimitCleanup::getInstance();
        $rate_limit_cleanup->register();

        // Pruning the logs table
        $log_cleanup = LogCleanup::getInstance();
        $log_cleanup->register();

        // Submission retention cleanup scheduler
        $submission_retention = SubmissionRetentionCleanup::getInstance();
        $submission_retention->register();

        // Job queue scheduler
        $job_scheduler = JobScheduler::getInstance();
        $job_scheduler->register();

        // AI Draft cleanup scheduler
        $draft_cleanup = DraftCleanupScheduler::getInstance();
        $draft_cleanup->register();
    }
}
