WP Cron – A more reliable execution of scheduled posts and scripts

 


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /var/www/weblogmechanic/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

WordPress features and ‘pseudo’ cron function which loads at a certain interval when people visit your site. The Cron function is modeled after the linux/unix cron function which runs on most servers and check regularly for scheduled jobs to do.

The problem with the WordPress Cron is when nobody for a while visits your site. Or if you have a lot of heavy scheduled work to do this will slow down the user experience of your site.

There is a solution.

A lot of hosts support adding a cron job on the server, mostly through administration inferfaces like cPanel.

It’s easy. The only thing you have to do is add a crontab and a plugin called WP Cron Control. This plugin will provide you with a link you can use to add to your cron.

Note: Some examples in the links given will result in storing every automatic call you make to the servers hard drive, which is probably not what you want. This is the command I added to the cron:

1
15 * * * * wget -O - -q "URL to Cron script"

See more on developing with the WordPress cron here

A longer article on the in and outs of WordPress cron is available here

Tags: , , , ,


'float:left')); ?>