0

I'm trying to set up cron in Wordpress (& I'm only familiar with Drupal). I have the following set up in cron which doesn't work, and when I paste the url into a browser I get 'ERROR: invalid username and/or password'. Yet the user (Cronjob) is in WP and I can logon to WP using the password, and has the required permissions set for CiviCRM.
usr/bin/wget -O - -q -t 1 'http://example.org.uk/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=Cronjob&pass=xxxxxxxx&key=2c3b60639d70ba87f61e819cb2cd0e67'

1
  • Just a thought but in /wp-content/plugins/civicrm/civicrm/bin/cron.php, do you have the owner permissions set to execute (744). By default, I think they are set to 644. – peterb Aug 16 '20 at 11:16
2

The problem was the single quotes around the path to cron.php, once I removed them it worked. Also usr/bin/wget was incorrect, just needs wget. Here's the working crontab entry with output redirected for debugging.

wget -O - -q -t 1 http://example.org.uk/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=Cronjob\&pass=xxxxx\&key=2c3b60639d70ba87f61e819cb2cd0e67 > /home/example/www/wp-content/uploads/civicrm/ConfigAndLog/cronerrors.txt 2>&1

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.