homeos/app/Console/Commands/AutomationsTickCommand.php

22 lines
463 B
PHP

<?php
namespace App\Console\Commands;
use App\Services\AutomationEngine;
use Illuminate\Console\Command;
/** Evaluates time-based automations (scheduled every minute). */
class AutomationsTickCommand extends Command
{
protected $signature = 'automations:tick';
protected $description = 'Evaluate time-based automations.';
public function handle(AutomationEngine $engine): int
{
$engine->tick();
return self::SUCCESS;
}
}