Hello,
I'm using scheduler for running some tasks. But sometimes I want to delete some jobs which are scheduled.
I'm doing this way but it didn't work.
ResqueScheduler.php
public static function delayedPush($timestamp, $item)
{
$timestamp = self::getTimestamp($timestamp);
$redis = \Resque::redis();
### My modification
// Custom key
$key = 'task_run_on_sunday_#1';
$value = 'resque:_schdlr_:1417599060'; // I found this key has job detail
// I add a custom key in redis
$redis->hset("job_scheduled_store", $key, $value);
$redis->rpush(self::QUEUE_NAME . ':' . $timestamp, json_encode($item));
$redis->zadd(self::QUEUE_NAME, $timestamp, $timestamp);
}
And If I want to delete task task_run_on_sunday_#1 from scheduler:
I delete that key resque:_schdlr_:1417599060 and delete 1417599060 from resque:_schdlr_.
Hello, I'm using scheduler for running some tasks. But sometimes I want to delete some jobs which are scheduled.
I'm doing this way but it didn't work.
ResqueScheduler.php
And If I want to delete task
task_run_on_sunday_#1
from scheduler: I delete that keyresque:_schdlr_:1417599060
and delete1417599060
fromresque:_schdlr_
.Could anyone help me to resolve this?