You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an error when trying to test my first task from the Windows command line. I'm still working on getting my head wrapped around Crunz, so this may very well be a silly mistake on my part.
Here's my task code.
use Crunz\Schedule;
$schedule = new Schedule();
$schedule->run( function() {
echo 'Howdy';
} )
->description( 'Test task' )
->everyMinute();
return $schedule;
The error I'm getting is
crunz.ERROR: 'c:\path\to\vendor\lavary\crunz\src/../crunz' is not recognized as an internal or external commad, operable program or batch file
It only does this when I'm trying to use a closure. If I enter a command like dir it works perfectly.
schedule:list works and shows object(Closure) as the task to run.
I've tried running the crunz.bat file from the folder it's in and also from the project root with the path in front. I've also tried running php crunz schedule:run from within the lavary/crunz folder, and that didn't work either.
The text was updated successfully, but these errors were encountered:
i also ran into this issue.
looks like a bug in lavary\crunz\src\Event.php:249 where it expects the file lavary\crunz\crunz to be executable by itself. prepending php to the command seems to fix this issue. resulting line 249: return "php " . __DIR__ . '/../crunz closure:run ' . http_build_query([$closure]);
I'm getting an error when trying to test my first task from the Windows command line. I'm still working on getting my head wrapped around Crunz, so this may very well be a silly mistake on my part.
Here's my task code.
The error I'm getting is
It only does this when I'm trying to use a closure. If I enter a command like
dir
it works perfectly.schedule:list
works and showsobject(Closure)
as the task to run.I've tried running the
crunz.bat
file from the folder it's in and also from the project root with the path in front. I've also tried runningphp crunz schedule:run
from within the lavary/crunz folder, and that didn't work either.The text was updated successfully, but these errors were encountered: