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

Cron Job #553

Closed
NevaPortal opened this issue Feb 14, 2020 · 22 comments · Fixed by #556
Closed

Cron Job #553

NevaPortal opened this issue Feb 14, 2020 · 22 comments · Fixed by #556
Milestone

Comments

@NevaPortal
Copy link

When i add cron job for https://prnt.sc/r2hmw0
from webmin i get this error https://prnt.sc/r2hmbc
i add cron job with root user and still get same problem. My other cron jobs works well.

@nabeelio
Copy link
Owner

What's the PHP command you use for the other cron jobs? That command might be wrong. Is this a shared host or your own?

@NevaPortal
Copy link
Author

NevaPortal commented Feb 14, 2020

Examples
1- /etc/webmin/virtualmin-awstats/awstats.pl mydomain.com
2- php-cgi -f /home/nevact/domains/mydomain.com/public_html/index.php a=CLI ng=console/5069397886 >/dev/null 2>&1

@nabeelio
Copy link
Owner

nabeelio commented Feb 14, 2020 via email

@NevaPortal
Copy link
Author

Ok i will contact with them tomorrow. I was trying with root user but let's see what they will say tomorrow...

@nabeelio
Copy link
Owner

nabeelio commented Feb 14, 2020 via email

@NevaPortal
Copy link
Author

Ok. I talked with them and they said was my fault that i add the cron job wrong way and they fixed for me. Now cron job working well. But i still have that warning https://prnt.sc/r3gzxb so didn't disappear.

@nabeelio
Copy link
Owner

nabeelio commented Feb 17, 2020 via email

@NevaPortal
Copy link
Author

NevaPortal commented Feb 17, 2020

Doesn't exist. But when i run cron job manually i see this https://prnt.sc/r3jozi

@nabeelio
Copy link
Owner

nabeelio commented Feb 17, 2020 via email

@NevaPortal
Copy link
Author

This is what i get https://prnt.sc/r3l3y4

@nabeelio
Copy link
Owner

nabeelio commented Feb 17, 2020 via email

@NevaPortal
Copy link
Author

NevaPortal commented Feb 17, 2020

No. Which dots? Sorry i am not to good with cron commands.
Here is the full command, change the way you like and i'll run it again.
cd /home/ottomanva/public_html && /usr/bin/php-cgi7.2 artisan schedule:run >> /dev/null 2>&1

@nabeelio
Copy link
Owner

Run just this, without any spaces:

cd /home/ottomanva/public_html && /usr/bin/php-cgi7.2 artisan schedule:run

@NevaPortal
Copy link
Author

No i tried this before and now get the same
`PHP Notice: Undefined index: argv in /home/ottomanva/public_html/vendor/symfony/console/Input/ArgvInput.php on line 52
PHP Warning: array_shift() expects parameter 1 to be array, null given in /home/ottomanva/public_html/vendor/symfony/console/Input/ArgvInput.php on line 56

In ArgvInput.php line 246:

Invalid argument supplied for foreach()

Content-type: text/html; charset=UTF-8`

@nabeelio
Copy link
Owner

That's very strange, it's like extra arguments are getting added somewhere. Can you contact your host again?

@nabeelio
Copy link
Owner

That looks like it's being run with the php-cgi executable, it needs to be run with php-cli. Can they give you the path to that?

@nabeelio
Copy link
Owner

nabeelio commented Feb 17, 2020

And try this command:

cd /home/ottomanva/public_html && /usr/bin/php-cgi7.2 -d register_argc_argv=On artisan schedule:run

But it needs to be running with the PHP cli executable. See if the above works, though.

@NevaPortal
Copy link
Author

NevaPortal commented Feb 17, 2020

It worked.
Because i have no scheduled flight i get this No scheduled commands are ready to run. Content-type: text/html; charset=UTF-8
https://prnt.sc/r3mowr

@nabeelio
Copy link
Owner

That's ok, that output is normal. Was that with the command above?

@nabeelio nabeelio added this to the 7.0.0 milestone Feb 18, 2020
@NevaPortal
Copy link
Author

Sorry i am late to answer. Yes with the command above.

@FroztIkon
Copy link

Fresh install of phpvms 7 beta 3,

cd /home/gridexva/public_html && /usr/bin/php-cgi7.2 -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1

solved a similar issue.

@nabeelio
Copy link
Owner

Sounds good. I have to add a note there that it's a suggested command, it's hard to detect the exact executable to use and you have to ask your host for which to specifically to use.

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

Successfully merging a pull request may close this issue.

3 participants