<?php

/**
 * Example: Auto-Discovered Recurring Job with recurringJob Property
 * 
 * Add a public $recurringJob property to any job class to automatically
 * register it as a recurring job. The module will scan the /jobs/ directories
 * on application boot and register any jobs with this property.
 * 
 * No explicit configuration needed in params-local.php!
 */

namespace frontend\jobs;

use Yii;
use yii\base\BaseObject;
use yii\httpclient\Client;
use backend\models\Galleriesbe;

class CartReminders extends BaseObject implements \common\components\Queue\JobInterface
{
    /**
     * Declare this job as recurring with automatic discovery.
     * 
     * Can be:
     * - An integer = interval in seconds
     * - An array with configuration options
     * 
     * @var int|array
     */
    public $recurringJob = 14400; // Every 4 hours
    
    // ... rest of class code ...
    
    /**
     * Execute the job.
     * After execution, the module automatically re-queues this job
     * after the specified interval.
     * 
     * @param \common\components\Queue\Queue $queue
     * @return void
     */
    public function execute($queue)
    {
        // Your job logic here
        Yii::info('Sending cart reminders...', __METHOD__);
        // ... send reminders ...
    }
}
