5 posts by 3 authors in: Forums > CMS Builder
Last Post: November 3, 2016   (RSS)

By Damon - October 17, 2016

Hi,

Can you check that the cronjob command in CMS Builder under Admin > Background Tasks is the same command you have setup to run with your host?

Here is an example cronjob command:
/usr/local/php56/bin/php /home/user/site.com/cms/cron.php

It will be different for each host and site. Also, check that if the version of PHP included in the command is correct.

Last thing to try is deleting the cronjob in your hosting account and creating a new one. 

Let me know if this works. Thanks!

---------------------------------------------------
Cheers,
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Hi, Damon -

Thanks for getting back to me. I've set-up cron jobs on numerous CMSB installations before - but this one just won't work! I've tried every conceivable permutation but cron.php simply will not run.

As I've said previously, I can drop a test script into the same directory as cron.php and that does run from the cronjob. The code looks like this:

* * * * * /usr/bin/php5 /homepages/path/htdocs/cmsb/cron.php
* * * * * /usr/bin/php5 /homepages/path/htdocs/cmsb/cronTest.php

The cronTest.php file runs fine - but there's not a peep from cron.php.

Out of interest, when I run cron manually the web interface suggests I should use this:

php -q /homepages/path/htdocs/cmsb/cron.php

Whereas the Background tasks suggests this:

/usr/bin/php /homepages/path/htdocs/cmsb/cron.php

I've tried these (and plenty of other permutations) and it just doesn't work.

:0/

Perch

Damon -

I think I've cracked it! The 1&1 server requires a declaration of the specific php version required to run the script:

* * * * * /usr/bin/php5.5 /homepages/path/htdocs/cmsb/cron.php

Works fine now! Perhaps worth making a note of for future reference?

:0)

Perch

By Dave - November 3, 2016

Thanks Perch, 

We try to guess the path the PHP on the server, but can't always tell.  So it's always advisable to go with what your webhost recommends if the default doesn't work.

Just out of curiosity, if you "find in page" on php info here: admin.php?menu=admin&action=phpinfo Is there any references to "php5.5"? 

And glad you got it working!  Cheers

Dave Edis - Senior Developer
interactivetools.com