Setup Cron Job / Scheduler on Hostgator

Hi,

I have installed SuteCRM on my Hostgator Shared server.
im unable to setup the Cron jobs and get the Schedulers running.

Im not sure what i have to enter exactly.

This is what the Schedulers Admin panel shows:

          • cd /home/{username}/public_html/CRM; php -f cron.php > /dev/null 2>&1
            

i entered this in the Cron Jobs in CPanel but it doesnt work. the schedulers do not run.

Any help would be appreciated.

I also get this when i upload a logo:

$mod_strings.LBL_LOGO

Thanks

Do you have console access? SSH, for example?

If so, please tell me results of these commands


which php
whereis php
php -i | grep "'_'"

which php

/usr/local/bin/php

whereis php

php: /usr/bin/php /usr/lib/php /usr/lib/php.ini /usr/lib64/php /usr/local/bin/php /usr/local/lib/php.ini,v /usr/local/lib/php /usr/local/lib/php.ini /usr/include/php /usr/share/php /opt/php54/bin/php /opt/phpstable/bin/php /opt/php55/bin/php /opt/php70/bin/php /opt/php71/bin/php /opt/php56/bin/php /opt/phpcur/bin/php /opt/php53/bin/php /opt/php52/bin/php /opt/phpedge/bin/php /usr/share/man/man1/php.1.gz

php -i | grep “’_’”
not getting any results for this

Try ONE of these for your cron setting:


* * * * * cd /home/{username}/public_html/CRM; /usr/local/bin/php -f cron.php > /dev/null 2>&1

if that doesn’t work, then


* * * * * cd /home/{username}/public_html/CRM; /usr/bin/php -f cron.php > /dev/null 2>&1

Thanks ill try these and get revert.

However i read the following:

Note: HostGator limits cron jobs on Shared servers to run in 15 minute intervals, since excessive cron jobs can cause high loads on the server

so should i put the settings like this?

*/15 * * * * cd /home/{username}/public_html/CRM; /usr/local/bin/php -f cron.php > /dev/null 2>&1

i also found this:

https://www.hostgator.com/help/article/what-do-i-put-for-the-cron-job-command

If those are the paths you should use, then just replace the PHP executable path:


*/15 * * * * cd /home/{username}/public_html/CRM; /opt/cpanel/ea-php72/root/usr/bin/php -f cron.php > /dev/null 2>&1

That is for v7.2 , you should match which version you’re using for the main app (you can check it through Admin / diagnostics / phpinfo)

I think allowing only cron jobs every 15 minutes completely sucks. There are plenty of hostings that are not expensive, and give you that and much more.

1 Like

php version is 7.1.

will try what you suggested and get back with the results.

Schedules working now…
Thank you very much.

Any idea what can be done on the logo update problem?

Can you explain the logo problem better?

Logo issue solved.
It was a folder permission issue.

Thanks alot for your help.

*/15 * * * * cd /home/{username}/public_html/SuiteCRM; /opt/cpanel/ea-php71/root/usr/bin/php -f cron.php > /dev/null 2>&1

Worked for me on hostgator