<?php

declare(strict_types=1);

namespace Builder\Core\Providers;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Support\ServiceProvider;

final class ScheduleServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        $this->callAfterResolving(Schedule::class, function (Schedule $schedule): void {
            $schedule->command('builder:prune-revisions')->daily();
            $schedule->command('builder:publish')->everyMinute()->withoutOverlapping();
        });
    }
}
