src/Anonym/Cron/Crontab/Crontab.php
public function jobExists($job = '')
    {
        $process = new Process('crontab -l');
        $process->run();

        $output = ($process->getIncrementalOutput());

        $jobs = array_filter(explode(PHP_EOL, $output), function($line) {
            return '' != trim($line);
        });

        return is_array($jobs) ?  array_search($job, $jobs) : false;
    }
public function jobExists($job = '')
    {
        $process = new Process('crontab -l');
        $process->run();

        $output = ($process->getIncrementalOutput());

        $jobs = array_filter(explode(PHP_EOL, $output), function($line) {
            return '' != trim($line);
        });

        return is_array($jobs) ?  array_search($job, $jobs) : false;
    }
public function jobExists ( $ job = '' ) { $ process = new Process ( 'crontab -l' ) ; $ process -> run ( ) ; $ output = ( $ process -> getIncrementalOutput ( ) ) ; $ jobs = array_filter ( explode ( PHP_EOL , $ output ) , function ( $ line ) { return '' != trim ( $ line ) ; } ) ; return is_array ( $ jobs ) ? array_search ( $ job , $ jobs ) : false ; }
search job in jobs

@param string $job
@return mixed
search job in jobs