“newbie in cron jobs here”
hello everyone
we use hostinger as our hosting server and we successfully installed invoice ninja as integrated system
but there is error warning that we have to use cron job error 403
the cron jobs setup in hostinger is abit different than other topics i found and when using the same commands it says … some characters cannot be used in command line and its the “>” symbol
i tried 5 commands from topics here and all failed
I logged in using SSH and tried /usr/bin/php artisan to see if there were any problems.
I was running the wrong PHP version, and I was unable to change it (even though I changed the version in your admin under Advanced/PHP Configuration
Even changing the .htaccess doesn’t have any effect.
Special for Hostinger:
The support told me that the PHP version is based on the main domain. So I changed that.
Running the same command gave me “INFO No scheduled commands are ready to run”.
So some progress here.
If you are creating a cronjob with special characters, you need to follow this tutorial:
Create a separate file to run the cron job
I created a script.sh in public_html/scripts with the following content
thank you simon this reply i created folder named scripts with file contains
#!/bin/sh
cd /home/user/domains/domain.net/public_html && /usr/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1
i created cron job with
/bin/sh/home//domains//public_html/scripts/script.sh every once an hour
yet nothing happened.
and here is script.sh
#!/bin/sh
cd /home/my account is here/domains/my domain here /public_html && /usr/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1
i dont know if this is would make a different but the url for ninja on my host followed by /public/index.php