- 🇩🇪Germany achikas Lower Saxony, Germany
I still get the same error on cron and don't know where to set the Site URI.
[error] Stop sending newsletter to avoid broken links / SPAM. Site URI not specified.
Can someone explain, please.
- 🇬🇧United Kingdom iainH
This is how I do it now via
crontab -e
. Resolves my issue.*/15 * * * * /usr/local/bin/drush -r /var/www/drupal/web core-cron --quiet --uri=my.website.name.uk
- Status changed to Closed: works as designed
11 months ago 9:19am 25 May 2024 - 🇳🇿New Zealand sphism
I get this same error even when i just run drush cron manually.
I thought it needed a base_url in settings.php but that was removed in drupal 8
- 🇬🇧United Kingdom iainH
Re @sphism : I supply the
uri
in thedrush
alias.See the following example for the alias (
balive
) of our live Drupal site which is indrush/sites/balive.site.yml
of the working directory where I invokedrush @balive cr
.balive: host: "${env.LIVESITE}" ssh: tty: 0 root: /var/www/drupal/web uri: "https://${env.LIVESITE}" user: webadmin
where we also have
export LIVESITE="our.live.site.uk"
previously sourced from a script in our working directory.I wonder whether this is 100% necessary .... but it has evolved over the years. And it works for me.
BTW, in
~/.ssh/config
I have something like:Host webadmin User webadmin Hostname our.live.site.uk PreferredAuthentications publickey IdentityFile ~/.ssh/oursite_rsa IdentitiesOnly yes