Replaced ClassicPress Cron Job Timing Out

ClassicPressBack in March I blogged about replacing the standard ClasicPress cron job with a system cron running on a schedule. The reason I did this was to improve the efficiency of my sites by having cron called on a schedule rather than every time a page was loaded.

However, I've recently been adding new functionality to my To Twitter plugin and found that scheduled tweets containing images were not working. I did some exploring and discovered that the problem was that cron jobs timeout after 30 seconds and processing one large, or several smaller, image would exceed this timeout.

I then found that an alternative method of calling cron seemed to run much faster and I was no longer having problems with the cron job timing out. This alternative method uses wget:

wget -q -O - https://{your domain}/wp-cron.php?doing_wp_cron >/dev/null 2>&1

The highlighted section should be replaced with your domain.