Ok, things are working now. Not sure if it was fact that cron environment didn’t have its PATH set as needed, or if there was other reason, but I followed the instructions here:
https://peterwilson.cc/real-wordpress-cron-with-wp-cli/
and
So now, my crontab
is
PATH=/usr/local/opt/[email protected]/bin:/usr/local/opt/[email protected]/bin:/usr/local/opt/[email protected]/sbin:/usr/local/opt/[email protected]/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
* * * * * /bin/bash /folder/wordpresscron.sh
(with newline after the crontab entry)
And the script:
#!/bin/bash
clear
cd /site
for hook in $(wp cron event list --next_run_relative=now --fields=hook --format=ids);
do wp cron event run "$hook";
done;
echo "now in cron" >> /folder/stdout.log
Anyway, glad I can move on now!