Our cron has worked without issue then all of a sudden it stopped and provided the error: Civi 5.23.3 WP 5.3

When the cron runs - I get the following: ERROR: Invalid username and/or password

My cron is as follows: /usr/local/bin/php.cli -q /home/tarabnyc/www/www/wp-content/plugins/civicrm/civicrm/bin/cli.php -u username -p password -e Job -a execute


Turns out the issue was with captcha on our site. The plugin Captcha by BestWebSoft and all other captcha's that I have tested, including Wordfence captcha cause cron error. I found a captcha plugin that allowed me to restrict registration but not login pages in the mean time.

| improve this answer | |
  • Very interesting. I also had this problem just a couple of days ago. I tried switching to wp-cli and it worked (docs.civicrm.org/sysadmin/en/latest/setup/jobs). I haven't identified the problem, but I had enabled reCaptcha support in the Wordfence plugin recently! – Mark Westergaard Apr 4 at 19:47
  • Interesting @MarkWestergaard - its good to know I wasn't alone - I wonder what would have been different. – themak Apr 6 at 22:26
  • @MarkWestergaard I can confirm - I just enabled wordfence captcha - same thing. – themak Apr 7 at 21:27
  • I just remembered that when I was trying to determine why cron wasn't running, I tried the HTTP method from a browser and received an email asking me to verify my login attempt because it was flagged as suspicious. I wonder if that's what's happening to cli,php when cron runs with captcha enabled. – Mark Westergaard Apr 7 at 23:35

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.