Skip to content

Instantly share code, notes, and snippets.

View Moqume's full-sized avatar

Mike Green Moqume

View GitHub Profile
@Moqume
Moqume / wp-cron.sh
Last active December 29, 2015 05:19 — forked from fcingolani/wp-cron.sh
Run wp-cron for a multi-site installation (accounts for path)
#!/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`;