Background Tasks Not Running

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

Hello, All -

I'm just setting up a new cmsb site (v3.05) and I've noticed that the Background Tasks aren't running. I've set-up a cronjob but for some reason cron.php will not run. (NB: I can run it manually by putting the URL in the browser window.)

What seems odd is I CAN run another script in the same directory as cron.php via the cronjob.

It doesn't make sense. Is there a setting that I need to change?

Note, I have exactly the same type of cron set-up on a different site but with the same server host and that works fine. I've run a comparison between the 2 cron.php files and they are identical.

:0/

Perch

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/

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