0

Civi 5.14 on WordPress 5.0

Hello, I have installed and am configuring Civi for a new client. He is on Inmotion Hsosting and civi is installed in a subdomain. I am having problems getting cron to run. It is not running by itself at all. Am I am missing a step somewhere or is my command line missing something? The wordpress user password is only numbers and letters, no other characters.

Cron Command line:

php -q /home/username/secure.domain.org/wp-content/plugins/civicrm/civicrm/bin/cli.php -s domain.org -u wordpressuser -p wordpressuserpassword -e Job -a execute > /dev/null 2>&1

enter image description here

Thank you

UPDATE

I just finished talking to Tech Support for the host and they said that cron job has been running every 5 minutes without fail. Yet in Civi it says it has not run since June 29th, 2019 3:46 PM.

On another note. I just tried a test scheduled mailing. I set it to send 5 minutes later. It still has not sent. The server host shows that my cron command is running every 5 minutes but it is clearly not doing what it should be doine. Civi says the resource URL is wrong and cron is not running. could this be related?

2

I prefer the wp-cli method to all other methods. Can this work at your host? https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#wp-cli

If you do not have Command line access, but the host provides a cron interface and wp-cli you can create a shell script to call:

#!/bin/bash 
/path/to/cli/php /path/to/wp --user=<cron user> --url=https://<site> --path=/path-to-web-root --timezone="<php timezone>" civicrm api job.execute auth=0

In your example calling just php may be the issue as cron may not now the path to the cli php executable.

  • I just finished talking to Tech Support for the host and they said that cron job has been running every 5 minutes without fail. Yet in Civi it says it has not run since June 29th, 2019 3:46 PM. Do you have any idea why this would be? – fdarn Jul 1 at 19:02
  • On another note. I just tried a test scheduled mailing. I set it to send 5 minutes later and 30 minutes later it still has not sent. The server host shows that my cron command is running every 5 minutes but it is clearly not doing what it should be doine. Civi says the resource URL is wrong and cron is not running. could this be related? – fdarn Jul 1 at 19:37
0

Did you possibly try using https://www.easycron.com/ (as described https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#webcron) and seeing if that will work. Like this you can see if the problem is with your civi instalation or your web host.

  • Thank you. I tried doing that. I keep getting this error ERROR: You need to send a valid user name and password to execute this file. I changed the password and made sure it is right but it still won't work. To clarify, is this the username and password of a Wordpress user with admin access? Or is it another user name and password? . – fdarn Jul 2 at 1:14
  • It is failing every test on easycron – fdarn Jul 2 at 1:27
  • Yes, It is the username and password for word press. are you including the sitekey? – netzih Jul 2 at 4:50
  • @fdarn If using easycron the URL to call would be secure.domain.org/wp-content/plugins/civicrm/civicrm/bin/… Remember to add www if needed and I'm assuming you have https. (otherwise change to http) – netzih Jul 2 at 5:06
  • i don't see any space for adding a Key in easycron. Actually the instructions in that link don't seem to match what I see there. – fdarn Jul 2 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.