Invalid argument supplied for foreach() when scheduling task

Posted 2 years ago by nate_nolting

I'm trying to get a scheduled task to run but i'm getting this following error every time it runs. I know I should be using the queue listener but I'd just like to know why this is happening. I've checked and register_argc_argv is turned on. What am I missing here?

php -i | grep register_argc_argv
register_argc_argv => On => On

Scheduled job:

$schedule->command('queue:work --tries 5')->everyMinute();

Cron:

php artisan schedule:run >> /dev/null 2>&1

The error:

[2016-08-17 14:04:01] production.ERROR: exception 'ErrorException' with message 'Invalid argument supplied for foreach()' in /home/gigazonegaming/vendor/symfony/console/Input/ArgvInput.php:281
Stack trace:
#0 /home/gigazonegaming/vendor/symfony/console/Input/ArgvInput.php(281): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Invalid argumen...', '/home/gigazoneg...', 281, Array)
#1 /home/gigazonegaming/vendor/symfony/console/Application.php(743): Symfony\Component\Console\Input\ArgvInput->hasParameterOption(Array, true)
#2 /home/gigazonegaming/vendor/symfony/console/Application.php(114): Symfony\Component\Console\Application->configureIO(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/gigazonegaming/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /home/gigazonegaming/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 {main}

Thanks for any advice!

Please sign in or create an account to participate in this conversation.