This guide explains how to set up WordPress cron jobs to run scheduled tasks automatically on your Web60 website.
What Are WordPress Cron Jobs
WordPress cron jobs are scheduled tasks that run automatically in the background. They handle important functions like publishing scheduled posts, checking for plugin updates, sending email notifications, and creating backups.
Unlike server cron jobs that run at exact times, WordPress cron (wp-cron) only runs when someone visits your website. This means if your site gets no visitors for hours, scheduled tasks won't run until the next visitor arrives.
How WordPress Cron Works on Web60
Your Web60 website comes with wp-cron enabled by default. When someone visits any page on your site, WordPress checks if any scheduled tasks need to run and executes them.
To see what cron jobs are currently scheduled:
- Log into your WordPress admin dashboard
- Install a plugin like "WP Crontrol" from the plugin directory
- Go to Tools > Cron Events to view all scheduled tasks
Setting Up Custom Cron Jobs
To create your own scheduled tasks, you'll need to add code to your theme's functions.php file or create a custom plugin.
Method 1: Using a Plugin
- Install the "WP Crontrol" plugin from your WordPress admin
- Go to Tools > Cron Events
- Click "Add Cron Event"
- Enter a hook name (like "my_daily_task")
- Set when you want it to run (hourly, daily, weekly)
- Click "Add Event"
You'll then need to create a function that runs when this hook fires.
Method 2: Adding Code to Functions.php
If you're comfortable editing code:
- Go to Appearance > Theme Editor in WordPress
- Select functions.php
- Add your cron job scheduling code
- Create the function that will run
For example, to schedule a daily task:
// Schedule the event
if (!wp_next_scheduled('my_daily_hook')) {
wp_schedule_event(time(), 'daily', 'my_daily_hook');
}
// Create the function
add_action('my_daily_hook', 'my_daily_function');
function my_daily_function() {
// Your code here
}
Common WordPress Cron Issues
If your cron jobs aren't running:
- Check if wp-cron is disabled in your wp-config.php file
- Ensure your site receives regular traffic to trigger cron jobs
- Look for plugin conflicts that might interfere
- Check if your scheduled tasks are actually registered
Disabling WordPress Cron
Some users prefer to disable wp-cron and use server-level cron jobs instead for more reliable timing. To disable wp-cron, add this line to your wp-config.php file:
define('DISABLE_WP_CRON', true);
Contact Web60 support if you need help setting up server-level cron jobs as a replacement.
If you're still stuck with cron job setup or your scheduled tasks aren't working properly, contact Web60 support for assistance.
FAQ
Q: Why aren't my WordPress cron jobs running?
A: WordPress cron only runs when someone visits your website. If you have low traffic, tasks might be delayed. Also check for plugin conflicts or if wp-cron has been disabled.
Q: Can I see what cron jobs are scheduled on my site?
A: Yes, install the "WP Crontrol" plugin and go to Tools > Cron Events to see all scheduled tasks and when they'll run next.
Q: How often do WordPress cron jobs check for tasks?
A: WordPress checks for scheduled tasks every time someone visits any page on your website, not at fixed time intervals.
Q: What's the difference between WordPress cron and server cron?
A: WordPress cron depends on website visitors to trigger it, while server cron runs at exact times regardless of traffic. Server cron is more reliable for time-sensitive tasks.
Q: Can I run cron jobs more frequently than hourly?
A: Yes, you can create custom schedules or use existing ones like every 5 minutes, but be careful not to overload your server with too frequent tasks.
Q: Will cron jobs slow down my website?
A: Properly configured cron jobs shouldn't noticeably slow your site. However, resource-intensive tasks running too frequently can impact performance.
Last updated: 1 March 2026