I am using PHP to implement scheduler. My requirement is to run a queue between 9:00AM till 9:00PM. Added jobs in queue beside that time period should not process.
Below is my code:
<?php
include('autoload.php');
include('ResqueScheduler.php');
include('Resque.php');
Resque::setBackend('XXXXXXXXXXXXXXXXXXX');
$args = array('glid' => '1234');
$time = 10;
try{
ResqueScheduler::enqueueAt($time, 'Test_Worker', $args);
}catch (Exception $e) {
echo 'EXCEPTION';
print_r($e);
}