Skip to main content
added 346 characters in body
Source Link
Chris Burgess
  • 9.9k
  • 15
  • 45

Your cron script doesmay not work as displayed because $PHP is not defined, and because PARAMS= -j -smydomain.org -u [email protected] -p xxxxxxxxxx -e Job -a process_mailing will not define the variable $PARAMS$PARAMS without quotemarks surrounding the valuesvariable value (instead you get a *sh error).

If your cron script is configured as you say, I recommendsuggest adding a MAILTO line with your email at the top so you receive the error output. This - this will help you debug whenif/when it fails.

[email protected]

I suspect that your website is not hosted at /var/public_html on Bluehost also? Might want to double-check that value., you might mean ~/public_html

Try this, amending values to suit your email/website?

[email protected]
PHP=/usr/php/54/usr/bin/php
CIVI_ROOT=~/public_html/mydomain/wp-content/plugins/civicrm/
PARAMS=" -j -smydomain.org -u [email protected] -p xxxxxxxxxx -e Job -a process_mailing"
*/5 * * * * cd $CIVI_ROOT; $PHP bin/cli.php $PARAMS

Your cron script does not work because $PHP is not defined, and because PARAMS= -j -smydomain.org -u [email protected] -p xxxxxxxxxx -e Job -a process_mailing will not define the variable $PARAMS without quotemarks surrounding the values.

If your cron script is configured as you say, I recommend adding a MAILTO line with your email at the top so you receive the error output. This will help you debug when it fails.

[email protected]

I suspect that your website is not hosted at /var/public_html on Bluehost also? Might want to double-check that value.

Your cron script may not work as displayed because $PHP is not defined, and because PARAMS= -j -smydomain.org -u [email protected] -p xxxxxxxxxx -e Job -a process_mailing will not define $PARAMS without quotemarks surrounding the variable value (instead you get a *sh error).

I suggest adding a MAILTO line with your email at the top so you receive the error output - this will help you debug if/when it fails.

[email protected]

I suspect that your website is not hosted at /var/public_html on Bluehost also? Might want to double-check that value, you might mean ~/public_html

Try this, amending values to suit your email/website?

[email protected]
PHP=/usr/php/54/usr/bin/php
CIVI_ROOT=~/public_html/mydomain/wp-content/plugins/civicrm/
PARAMS=" -j -smydomain.org -u [email protected] -p xxxxxxxxxx -e Job -a process_mailing"
*/5 * * * * cd $CIVI_ROOT; $PHP bin/cli.php $PARAMS
Source Link
Chris Burgess
  • 9.9k
  • 15
  • 45

Your cron script does not work because $PHP is not defined, and because PARAMS= -j -smydomain.org -u [email protected] -p xxxxxxxxxx -e Job -a process_mailing will not define the variable $PARAMS without quotemarks surrounding the values.

If your cron script is configured as you say, I recommend adding a MAILTO line with your email at the top so you receive the error output. This will help you debug when it fails.

[email protected]

I suspect that your website is not hosted at /var/public_html on Bluehost also? Might want to double-check that value.