When last we left “Unblogged Bits,” I was trying to figure out why (a) sometimes it didn’t fire off, (b) other times it fired off multiple times, (c) it was firing off at both 5 p.m. and 6 p.m. for a prolonged period. “It” being a specially-modified (for Google Reader and including for PHP5) version of the Digest Post plug-in for WordPress.
Well, among the things I did during that exercise is some very light poking into the wp-cron setup, which is essentially a process timer that WordPress maintains (indepdendent — or as a higher level, perhaps — of the cron setup on the server.
(If your eyes are glazing over now, you can skip onto the next post. It’s okay. I write this stuff down mostly for my own benefit, so I remember it in a month.)
I loaded in some plug-ins around that whole process:
Cron GUI 1.01
» Simon Wheatley (url)
See what’s in the WP Cron schedule.
WP-Crontrol 1.0
» Edward Dale (url)
WP-Crontrol lets you take control over what’s happening in the WP-Cron system. See my series on Taking control of WP-Cron using WP-Crontrol for usage ideas.
Cron GUI added a Tools/Whats In Cron menu entry to my WP Admin interface. It shows the various wp-cron jobs lined up. And, yup, after the twice-daily checks for WP updates and plug-in updates and theme updates — there are some entries for Digest Post.
Um … many entries. For some reason, it’s firing off 5 iterations of it at 19:00 (7 pm) and another 5 iterations at 20:00 (8 pm). Why so many iterations? No idea.

And why 7 and 8 pm? I thought it was going off at 5 and 6 pm. But remember that the server this site is hosted on is back on the East Coast. No matter what I put in as the time zone in the WP admin screen, PHP goes by the time zone on the server. I think, now that I’m on PHP 5, I can add in a function to set the time zone, but that’s a hack for another day.
And because it was firing off twice a day, and catching anything I’d shared from GReader for the second go-around, I was ending up with two posts titled, “Unblogged Bits from Tuesday, 19 February 2010.” Which, given the way this has been sometimes screwed up, meant (I’m sure) that some folks thought the two were duplicates and skipped over one or other, missing out on all the hilarity which is my GReader share.
And that’s why earlier this week I changed the title that Digest Post generates (hacking the PHP code directly, as there’s no admin interface) to include the time.
And that’s why, taken all together, the posts were coming out with a title that was two hours later (EST) than the post (MST).
*sigh*
Anyway, once the behavior had become predictable, Eris had to have her fun, so last night the darned thing didn’t fire off. At 5 or at 6 (MST).
I went in last night to look at the wp-cron jobs, and fired off the Tools/Crontrol add-on. And … hey, not only does it list the queued jobs, but has an interface to cancel each, or to “Do Now.”
(Note: Crontrol also adds a Settings/Crontrol entry, which lets you add a new wp-cron schedule, rather than just Daily, Hourly, or the WP-defined Twice-Daily. I had only seen that one, not the Tools one, which looks like it obsoletes my need for Cron GUI. But I digress.)
So I clicked on “Do Now” for one of the Digest Post entries for later today. And it executed. And an Unblogged Bits entry was generated. Hot diggety.
And I tried it again this morning, and it worked, too (albeit with the goofy timestamp; I have to see what I can do about that).
This actually solves, I think, one of the problems I was having with this whole mess, i.e., Google Reader only generates RSS for the last 20 entries shared. So when Digest Post was running at 5 pm, if I had done more than 20 shares since the previous evening, they were never published.
Now, if I feel that I’ve done a lot already, I can do an interim Digest Post, manually, and have it post everything to that point in time. (Mostly — there’s a lag in the generation of the RSS feed from GReader to Feedburner.)
So … expect (maybe, if I think of it) more, smaller Unblogged Bits entries scattered at different times.
And, when it breaks in some exciting and new fashion, now I have notes on the most recent thing I did.
One thought on “More in the “Unblogged Bits” saga”