-
-
Save Moqume/7620966 to your computer and use it in GitHub Desktop.
Run wp-cron for a multi-site installation (accounts for path)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
db_host="host"; | |
db_user="user"; | |
db_pass="password"; | |
db_name="database"; | |
domains=`mysql --silent --skip-column-names --host $db_host --user $db_user -p$db_pass $db_name --execute "SELECT CONCAT(domain,path) as url FROM wp_blogs WHERE archived = '0' AND spam = '0' AND deleted = '0';"`; | |
for domain in $domains; do | |
the_date=`date`; | |
echo -ne "$the_date\t$domain\t"; | |
response=`curl -s http://$domain/wp-cron.php > /dev/null`; | |
exit_status=$?; | |
if [ $exit_status != 0 ]; then | |
echo "ERR" | |
else | |
echo "OK" | |
fi | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment