Tips for WordPress Cron functions

WordPress provides some nice APIs for executing unattended scheduled tasks without relying on any external cron! Usually, we need to create a cron from our control panel / systems! However, if you implement built in cron features of WordPress, you gain better portability of your WordPress site!

However, it has a great limitation! This cron fully relies on site hits! WordPress triggers its cron functions after someone visits the site! When anyone visits your site, WP checks if any cron are supposed to be executed on or earlier of that moment! If no one visits your site, WordPress will fail to execute your tasks!

In this blog, I am going to show two tips that may be helpful while you work with wp-cron functions!

Continue reading →