public static function updateCrontab($sourceFilename, $backupDir = null)
    {
        if (empty($sourceFilename)) {
            throw new \InvalidArgumentException('Invalid argument $srcFilename, must be not empty');
        }

        if (!FileHelper::fileExists($sourceFilename)) {
            throw new \RuntimeException(
                sprintf(
                    'File crontab_filename:"%s" not found',
                    $sourceFilename
                )
            );
        }
        $backupDir = $backupDir ?: '{{deploy_path}}/backup/crontab';

        if (!FileHelper::dirExists($backupDir)) {
            run('mkdir -p '.$backupDir);
            !isVerbose() ?: writeln(sprintf('Backup dir "%s" created', $backupDir));
        }

        $backupFilename = sprintf('%s/crontab.%s', $backupDir, date('Y-m-d_H:i:s'));
        if ((bool)run('if crontab -l > /dev/null 2>&1; then echo 1; else echo 0; fi')) {
            run(sprintf('crontab -l > %s', $backupFilename));
        } else {
            run(sprintf('touch %s', $backupFilename));
        }

        $diff = (bool)run(
            sprintf('if ! diff -q %s %s > /dev/null 2>&1; then echo 1; fi', $backupFilename, $sourceFilename)
        );

        $result = false;
        if ($diff) {
            run(sprintf('crontab "%s"', $sourceFilename));
            !isVerbose() ?: writeln(run('crontab -l'));

            $result = true;
        } else {
            !isVerbose() ?: writeln('Crontab has no diff');
            run('rm '.$backupFilename);
        }

        return $result;
    }