src/CakeResque.php
public static function enqueueAt($at, $queue, $class, $args = [], $trackStatus = null)
    {
        if (Configure::read('CakeResque.Scheduler.enabled') !== true) {
            return false;
        }

        if ($trackStatus === null) {
            $trackStatus = Configure::read('CakeResque.Job.track');
        }

        if (!is_array($args)) {
            $args = [$args];
        }

        $r = call_user_func_array(self::$resqueSchedulerClass . '::enqueueAt', array_merge([$at], [$queue], [$class], [$args], [$trackStatus]));

        if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {
            $caller = version_compare(PHP_VERSION, '5.4.0') >= 0
                ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)
                : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        } else {
            $caller = debug_backtrace();
        }

        self::$logs[ $queue ][] = [
            'queue'  => $queue,
            'class'  => $class,
            'method' => array_shift($args),
            'args'   => $args,
            'jobId'  => $r,
            'caller' => $caller,
            'time'   => $at instanceof DateTime ? $at->getTimestamp() : $at,
        ];

        return $r;
    }
public static function enqueueAt($at, $queue, $class, $args = [], $trackStatus = null)
    {
        if (Configure::read('CakeResque.Scheduler.enabled') !== true) {
            return false;
        }

        if ($trackStatus === null) {
            $trackStatus = Configure::read('CakeResque.Job.track');
        }

        if (!is_array($args)) {
            $args = [$args];
        }

        $r = call_user_func_array(self::$resqueSchedulerClass . '::enqueueAt', array_merge([$at], [$queue], [$class], [$args], [$trackStatus]));

        if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {
            $caller = version_compare(PHP_VERSION, '5.4.0') >= 0
                ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)
                : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
        } else {
            $caller = debug_backtrace();
        }

        self::$logs[ $queue ][] = [
            'queue'  => $queue,
            'class'  => $class,
            'method' => array_shift($args),
            'args'   => $args,
            'jobId'  => $r,
            'caller' => $caller,
            'time'   => $at instanceof DateTime ? $at->getTimestamp() : $at,
        ];

        return $r;
    }
public static function enqueueAt ( $ at , $ queue , $ class , $ args = [ ] , $ trackStatus = null ) { if ( Configure :: read ( 'CakeResque.Scheduler.enabled' ) !== true ) { return false ; } if ( $ trackStatus === null ) { $ trackStatus = Configure :: read ( 'CakeResque.Job.track' ) ; } if ( ! is_array ( $ args ) ) { $ args = [ $ args ] ; } $ r = call_user_func_array ( self :: $ resqueSchedulerClass . '::enqueueAt' , array_merge ( [ $ at ] , [ $ queue ] , [ $ class ] , [ $ args ] , [ $ trackStatus ] ) ) ; if ( defined ( 'DEBUG_BACKTRACE_IGNORE_ARGS' ) ) { $ caller = version_compare ( PHP_VERSION , '5.4.0' ) >= 0 ? debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS , 1 ) : debug_backtrace ( DEBUG_BACKTRACE_IGNORE_ARGS ) ; } else { $ caller = debug_backtrace ( ) ; } self :: $ logs [ $ queue ] [ ] = [ 'queue' => $ queue , 'class' => $ class , 'method' => array_shift ( $ args ) , 'args' => $ args , 'jobId' => $ r , 'caller' => $ caller , 'time' => $ at instanceof DateTime ? $ at -> getTimestamp ( ) : $ at , ] ; return $ r ; }
Enqueue a Job at a certain time.

@param int|DateTime $at Timestamp or DateTime object giving the time when the job should be enqueued.
@param string $queue Name of the queue to enqueue the job to.
@param string $class Class of the job.
@param array $args Arguments passed to the job.
@param boolean $trackStatus Whether to track the status of the job.
@since 2.3.0
@return string Job Id.
Enqueue a Job at a certain time .