Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cronjob error "Too many arguments." #255

Closed
chiendv opened this issue Jul 27, 2016 · 3 comments
Closed

cronjob error "Too many arguments." #255

chiendv opened this issue Jul 27, 2016 · 3 comments

Comments

@chiendv
Copy link

chiendv commented Jul 27, 2016

Hi,
My cronjob geting this error when run.

[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments.

Environment info

Operating System: CentOs
PHP Version: 7.0.9
Node Version: 2.1.3
Database System: mysql
Database Version:
QUEUE_DRIVER=redis
Socket: Node

Logs (see storage/logs/) or other output that would be helpful

[2016-07-27 22:22:01] production.ERROR: Symfony\Component\Console\Exception\RuntimeException: Too many arguments. in /home/dp/public_html/deployer/vendor/symfony/console/Input/ArgvInput.php:179
Stack trace:
#0 /home/dp/public_html/deployer/vendor/symfony/console/Input/ArgvInput.php(88): Symfony\Component\Console\Input\ArgvInput->parseArgument('1')
#1 /home/dp/public_html/deployer/vendor/symfony/console/Input/Input.php(62): Symfony\Component\Console\Input\ArgvInput->parse()
#2 /home/dp/public_html/deployer/vendor/symfony/console/Command/Command.php(224): Symfony\Component\Console\Input\Input->bind(Object(Symfony\Component\Console\Input\InputDefinition))
#3 /home/dp/public_html/deployer/vendor/laravel/framework/src/Illuminate/Console/Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /home/dp/public_html/deployer/vendor/symfony/console/Application.php(844): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /home/dp/public_html/deployer/vendor/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Console\Scheduling\ScheduleRunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /home/dp/public_html/deployer/vendor/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/dp/public_html/deployer/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))
#8 /home/dp/public_html/deployer/artisan(45): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 {main}  
@REBELinBLUE
Copy link
Owner

hmm, odd. What do you have the cronjob command set to?

@chiendv
Copy link
Author

chiendv commented Jul 27, 2016

here it is:

/usr/bin/php70 /home/dp/public_html/deployer/artisan schedule:run 1

@REBELinBLUE
Copy link
Owner

REBELinBLUE commented Jul 27, 2016

It is the 1 which is causing the problem, that shouldn't be there, I assume you took it from

https://github.com/REBELinBLUE/deployer/blob/master/examples/crontab

the 1>> at the end is for redirecting all output (stdout) to /dev/null, the 2>&1 is for for redirecting errors (stderr) to the same location as output, i.e /dev/null

See http://www.tldp.org/LDP/abs/html/io-redirection.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants