Category Archives: Wired Fatherhood

The E2 Chapter of Wired Fatherhood

So it has been a while since I have written to this blog. Life has been extremely busy, both at work and at home. I have been going on business trips for the past couple of months and coupled with the plethora of things to do at the new house, I haven’t really had time to sit down and get back into the groove of writing.

Since the Year One + 4 months post, it has been another 4 months. (Apologies, I should get back into a more consistent schedule soon!) Evelyn is now 20 months old and doing quite a bit. She is talking a lot and running around asking for and doing things. She is beginning to show her character which I’ll classify as caring, inquisitive, and sometimes a little “strong willed” (read: stubborn) like her parents. She is learning lots in daycare and is really enjoying her time with the teachers and peers there. I’ll get into more in subsequent posts. :-)

Anyways, so one of the other reasons for my hiatus from writing is because we were busy preparing for another little package’s arrival! The last couple of days have been a blur and we are running on a single digit of sleep between the 2 of us. More on that in subsequent posts too. :-)

Today, I am adding some new categories to the posts for better navigation. I will also be changing some of the images and possibly layout of the site. In terms of content, there will be a series of posts coming out shortly about this ever changing journey that is fatherhood.

Welcome to the E2 Chapter of Wired Fatherhood!

Announcement Teaser

Yay!

That’s it for now.
Stay Tuned!
E

I am back!

Hi all,

It’s been a while, I have been busy with work and other transitions.
It just didn’t slow down at all since the last time that I posted, hench my lack of activity.
Things are returning to normal, so I expect that I will have more time to write in the coming weeks.

Rest assured, more posts are coming.
Stay tuned!

E

What’s a Cron Job?

Cron Job

Cron Job…

What the heck is a Cron Job?!

According to Wikipedia,

The software utility cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like connecting to the Internet and downloading email at regular intervals. The name cron comes from the Greek word for time, χρόνος chronos.

To me, it’s something that I can use to make sure that my scheduled posts by WordPress aren’t missed! Because of the backlog from the last month or so, I didn’t want to put up 5 posts all at once. So I decided to go ahead and use the scheduling feature of WordPress. However, on my train ride home, I found that the post did not get put up by the scheduler and it said “Missed Schedule” in the status of the post.

Looking online yielded threads of WordPress users having similar issues. While Automattic provides fixes every now and then, it seems to be a little spotty in terms of coverage and I found that generally, every one gravitates to swapping the WP Cron to the real Linux Cron job.

WP Cron
From my readings, it seems that WP Cron is only triggered if there is a read to your site, in which case, when it loads a page for a viewer, it checks whether or not there are jobs queued up and executes them if there are. The problem with this approach is that sites that don’t get visited often (like mine), sometimes have problems triggering the delayed posting to be on time. If no one visits the site, then the post doesn’t get triggered and it is filed under “Missed Schedule”. In my case, since most of my traffic comes from WordPress’ publicize feature, which puts my post on the various social media sites (Twitter, Facebook, Google+, tumblr, App.net), it becomes a chicken and the egg problem. Without these links driving traffic, the WP Cron won’t fire and if it doesn’t fire, no one comes to the site. So alas, it was time for me to switch to using the real Linux Cron job.

Turning On the Cron Job
Now most of the guides on the internet for setting up a Cron job involves cPanel, a custom control panel from your hosting provider’s utility box that allow you to manage your site. But for those who have the ability to access the command line from their servers, you can edit your crontab directly.

sudo crontab -e

Add the line and replace your.site.com with your site address:

*/15 * * * * wget -O /dev/null http://your.site.com/wp-cron.php?doing_wp_cron

What the above setting does is set up your cron job to hit your wp-cron.php every 15 minutes to trigger the WordPress queue of things it needs to do. Once that’s set up, you won’t need WordPress to trigger it’s fake cron on page load, so you’ll need to disable it in wp-config.php by adding the following line:

DEFINE('DISABLE_WP_CRON', true);

Once that’s done, your WordPress Cron will be disabled and your site should be able to schedule posts using the real Linux Cron and have them published in a timely manner.

Hope that helps.
E

Useful Resources
How to set up your cron in Ubuntu:
https://help.ubuntu.com/community/CronHowto

How the WordPress Cron Works:
http://wp.smashingmagazine.com/2013/10/16/schedule-events-using-wordpress-cron/
http://code.tutsplus.com/articles/insights-into-wp-cron-an-introduction-to-scheduling-tasks-in-wordpress–wp-23119

Sites I looked at to figure out how to do this:
http://wpdailybits.com/blog/replace-wordpress-cron-with-real-cron-job/74
http://stevengliebe.com/2013/11/18/using-real-wordpress-cron-job-increased-reliability/

Glass Invites!

Google Glass

Google Glass

So… I have some Glass invites available!

Just a reminder that all Glass Explorers must:
-Be US residents
-Be at least 18 years old
-Be able to purchase Glass
-Provide a US shipping address or pick up their Glass in New York, San Francisco or Los Angeles

Let me know in the comments below if you are interested and what you would use it for!
E