@echo off
setlocal
cd /d C:\Users\lucia\abogadaslitoral

if not exist storage\logs mkdir storage\logs

for /f "tokens=2 delims==" %%P in ('wmic process where "name='php.exe' and commandline like '%%artisan schedule:work%%'" get ProcessId /value ^| find "="') do (
	exit /b 0
)

"C:\xampp\php\php.exe" artisan schedule:work --no-interaction >> storage\logs\scheduler-work.log 2>&1
