lib/ResqueScheduler.php
public static function removeDelayed($queue, $class, $args)
    {
       $destroyed=0;
       $item=json_encode(self::jobToHash($queue, $class, $args));
       $redis=Resque::redis();

       foreach($redis->keys('delayed:*') as $key)
       {
           $key=$redis->removePrefix($key);
           $destroyed+=$redis->lrem($key,0,$item);
       }

       return $destroyed;
    }
public static function removeDelayed($queue, $class, $args)
    {
       $destroyed=0;
       $item=json_encode(self::jobToHash($queue, $class, $args));
       $redis=Resque::redis();

       foreach($redis->keys('delayed:*') as $key)
       {
           $key=$redis->removePrefix($key);
           $destroyed+=$redis->lrem($key,0,$item);
       }

       return $destroyed;
    }
public static function removeDelayed ( $ queue , $ class , $ args ) { $ destroyed = 0 ; $ item = json_encode ( self :: jobToHash ( $ queue , $ class , $ args ) ) ; $ redis = Resque :: redis ( ) ; foreach ( $ redis -> keys ( 'delayed:*' ) as $ key ) { $ key = $ redis -> removePrefix ( $ key ) ; $ destroyed += $ redis -> lrem ( $ key , 0 , $ item ) ; } return $ destroyed ; }
Remove a delayed job from the queue

note: you must specify exactly the same
queue, class and arguments that you used when you added
to the delayed queue

also, this is an expensive operation because all delayed keys have tobe
searched

@param $queue
@param $class
@param $args
@return int number of jobs that were removed
Remove a delayed job from the queue