Home

Geeklog: What I Learnt Today / Adam

Getting WordPress to actually publish posts on schedule

> Getting WordPress to actually publish posts on schedule.
Often I'm having scheduled posts fail to publish when they were told to, I think its due to the site being quite quiet in terms of traffic. I'm now runninga cron job every 10 minutes to poke it into action.

#!/bin/sh
timestamp=$(date '+%Y-%m-%d %H:%M:%S');
curl=$(curl -s -o /dev/null -w "%{http_code}, %{url_effective},
%{time_total}\n" http://yourblog.com/wp-cron.php?doing_wp_cron=true);
echo $timestamp", "$curl >> yourblog.com.cron.log

/ Adam