Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iskubiy's avatar

Cant add cron entry to goddady

Hi. Can anybody please help with adding cron job on godaddy hosting in order to use Laravel's task scheduler. While adding the cron job i'm providing this command ** * * * * * php /path/to/artisan schedule:run 1>> /dev/null 2>&1** with relevant path, but it throws an error ** "-":1: bad command **. Please help

0 likes
5 replies
ahuggins's avatar

why is it the command wrapped between ** and **?

try just this: * * * * * php /path/to/artisan schedule:run 1>> /dev/null 2>&1

iskubiy's avatar

yes I was just trying to apply macrkdown)) Thanks for the link. Now I achieved to add cron without any error. But my commands doesn't work. Maybe it's because of wrong path or something.

iskubiy's avatar

I still couldn't make my commands work. I successfully added a cron but it doesn't work. I think the path that i'm specifying is not correct. php -d register_argc_argv=On /home/projectname/artisan schedule:run 1>> /dev/null 2>&1 . Any suggestions? Maybe there is a log files for cron. But I couldn't find it. Please help :(

phildawson's avatar

@iskubiy If you manually run that from terminal does it work without error? Tmp remove the stdout & stderr to /dev/null bit

php -d register_argc_argv=1 /path/to/artisan schedule:run

Please or to participate in this conversation.