0

Joomla 3.7.0 CiviCRM 4.7.19 PHP 5.5.38

I try to get a cron job running for civicrm with a joomla installation.

I looks the the wget does not allows me to get the third parameter over. see example eq1 and eq4. Quotes did not help either. See eq 2 and eq3

examples are senitize (PASSWORD USER MYKEY) HSOMETHING stands for https . Stack exchange does not let me post otherwise

Please advice.


eq1
wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY&name=USER&pass=PASSWORD

Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 76 [text/html]
Saving to: “STDOUT”

0% [ ] 0 --.-K/s ERROR: You need to send a valid user name and password to execute this file
100%[====================================================================================>] 76 --.-K/s in 0s 

2017-05-21 17:34:57 (19.5 MB/s) - written to stdout [76/76]


[1]- Done wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY
[2]+ Done name=USER


**************************************************************************************
eq2

wget -O - -t 1 "HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&pass=PASSWORD@ki23&key=MYKEY"

Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-05-21 17:37:04 ERROR 500: Internal Server Error.

**************************************************************************************
eq3
wget -O - -t 1 'HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?name=USER&pass=PASSWORD@ki23&key=MYKEY'

Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-05-21 17:38:45 ERROR 500: Internal Server Error.


**************************************************************************************
eq4
wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY&name=USER&pass=PASSWORD@ki23
Resolving www.MYSITE.org... 66.198.240.51
Connecting to www.MYSITE.org|66.198.240.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 76 [text/html]
Saving to: “STDOUT”

0% [ ] 0 --.-K/s ERROR: You need to send a valid user name and password to execute this file
100%[====================================================================================>] 76 --.-K/s in 0s 

2017-05-21 17:41:04 (23.3 MB/s) - written to stdout [76/76]


[1]- Done wget -O - -t 1 HSOMETHING://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=MYKEY
[2]+ Done name=USER
2
  • Why have you not updated joomla to 3.7.1? There were several bugs in joomla 3.7.0 that impeded cron jobs. Commented May 22, 2017 at 23:01
  • Joomla 3.7.1 did and with the command updated with backslashes before the & signs. eq \& Commented May 23, 2017 at 3:38

3 Answers 3

1

Joomla 3.7.1 made this work from the command line. But from a c-panel cron job I got the error: "cli.php can only be run from command line."

Now this also works from the command line as well as with the c-panel cron job. : Note the back slashes!

wget -O - -t 1 https://www.MYSITE.org/administrator/components/com_civicrm/civicrm/bin/cron.php?key=THEKEY\&name=THEUSER\&pass=THEPASSWORD

0

One thing to consider is to make sure that the user you are using does have all permissions needed. Probably want to create a super user just for this. I had created on in the past which I just called mailuser.

You also want to make sure the password does not have any characters that may cause issues. For example, I've tried a random password before that included a $, and php tried to interpre

0

Does your password have any shell meta-characters in it? Basically anything outside [a-zA-z0-9] might need to be escaped with a preceding \ before it'll work on command line.

Can you download the file to your desktop and use scp (WinSCP?) to copy it to your host?

Last thought, place the whole string from http through the end in single quotes - this turns off shell meta-character processing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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