WP-CLI issues running wp-cli commands in cronjobs
-
trying to run:
* * * * 1-5 /usr/local/bin/wp –path=/home/myuser/public_html/wordpress core version >> /root/test.log 2>&1
and I′m getting in test.log:
Content-type: text/html; charset=UTF-8
It′s what I′m getting from any bash script with wp-cli commands. Those scripts run fine from command line:
#!/bin/bash
WP=/usr/local/bin/wp
array=($(find /home -maxdepth 6 -type d -name ‘*wp-content*’ -exec dirname {} \;))for x in ${array[@]} ;do
echo “Checking:” $x
$WP –allow-root –path=$x core version
done
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WP-CLI issues running wp-cli commands in cronjobs’ is closed to new replies.