public function isCrontabSetup()
    {
        $process = new Process('crontab -l');
        $process->run();

        if ($process->isSuccessful()) {
            $output = $process->getOutput();

            return preg_match('$bin\/grav schedule$', $output) ? 1 : 0;
        }

        $error = $process->getErrorOutput();

        return Utils::startsWith($error, 'crontab: no crontab') ? 0 : 2;
    }
public function isCrontabSetup()
    {
        $process = new Process('crontab -l');
        $process->run();

        if ($process->isSuccessful()) {
            $output = $process->getOutput();

            return preg_match('$bin\/grav schedule$', $output) ? 1 : 0;
        }

        $error = $process->getErrorOutput();

        return Utils::startsWith($error, 'crontab: no crontab') ? 0 : 2;
    }
public function isCrontabSetup ( ) { $ process = new Process ( 'crontab -l' ) ; $ process -> run ( ) ; if ( $ process -> isSuccessful ( ) ) { $ output = $ process -> getOutput ( ) ; return preg_match ( '$bin\/grav schedule$' , $ output ) ? 1 : 0 ; } $ error = $ process -> getErrorOutput ( ) ; return Utils :: startsWith ( $ error , 'crontab: no crontab' ) ? 0 : 2 ; }
Helper to determine if cron job is setup

@return int
Helper to determine if cron job is setup