<?php

namespace App\Console\Commands;

use Exception;
use Illuminate\Console\Command;

class SitemapRunCrawlCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'sitemap:runCrawl';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Run sitemap generator crawl';

    /**
     * Execute the console command.
     *
     * @return int
     * @throws Exception
     */
    public function handle(): int
    {
        shell_exec('/usr/local/bin/php ~/public_html/core/generator/runcrawl.php');
        return 0;
    }
}
