Settings Reference

Cron Jobs Settings

7 min read Updated Apr 6, 2026

Manage scheduled background tasks in WordPress Download Manager. Access these settings from Downloads > Settings > Cron Jobs.

Overview

WPDM uses WordPress cron to handle scheduled tasks such as:

  • Sending activity reports
  • Cleaning expired downloads
  • Processing email queues
  • Updating statistics
  • License validation
  • Cache cleanup

Job Status Summary

At the top of the page, a summary bar displays a real-time count of all jobs grouped by their current status:

  • Total Jobs — The overall number of jobs registered in the system.
  • Pending — Jobs that are queued and waiting to be executed.
  • Running — Jobs currently being processed.
  • Completed — Jobs that have finished successfully.
  • Failed — Jobs that encountered an error during execution. A red count here requires your attention.

External Cron URL

This section provides a unique URL that can be used to trigger job processing from outside of WordPress.

When to use this: WordPress’s built-in cron system only runs when someone visits your site. If your site has low traffic, jobs may not execute on time. Using an external cron service ensures jobs run on a reliable schedule regardless of site traffic.

How to use it:

  1. Copy the URL shown in the input field by clicking the Copy button on the right.
  2. Add it to your server’s crontab, or paste it into an external cron service such as EasyCron.
  3. Set your desired interval (e.g., every 5 minutes) in the external service.

Scheduled WordPress Cron Events

This table lists the internal WordPress cron hooks registered by the plugin, along with a brief description and their next scheduled run time.

Column Description
Hook The internal cron hook name used by WordPress.
Description A plain-language summary of what the hook does.
Next Run The date and time when the hook is next scheduled to execute.

Default Hooks

  • __wpdm_cron — Handles scheduled maintenance tasks for the plugin.
  • __wpdm_process_jobs — Processes the job queue, executing any pending background jobs.

If the Next Run time is in the past, it may indicate that WordPress cron is not running properly on your site, and using the External Cron URL is recommended.

Run Job Queue Now

Clicking the Run Job Queue Now button manually triggers immediate processing of all queued jobs. This is useful for:

  • Testing whether jobs execute correctly.
  • Immediately retrying failed jobs without waiting for the next scheduled run.
  • Diagnosing cron related issues on your site.

Recent Jobs

This table shows a log of the most recently created jobs and their current execution status.

Column Description
ID A unique identifier assigned to each job.
Type The job class name indicating the type of task being performed.
Queue The queue group the job belongs to (e.g., premium-packages).
Status Current execution status: Pending, Running, Completed, or Failed.
Attempts How many times execution has been attempted out of the maximum allowed (e.g., 0/3).
Execute At The date and time the job was scheduled to run.
Actions Manual actions you can take on the job.

Each job in the Recent Jobs table has an Actions column on the right. The available action buttons differ depending on the current status of the job.

Actions for Pending Jobs

When a job has a Pending status (queued but not yet executed), three action buttons are available:

  • Run — Immediately executes the job without waiting for the next scheduled cron cycle. This is useful when you want to process a specific job right away, for example after making a configuration change or during testing.
  • Cancel — Cancels the job before it runs. The job will be removed from the active queue and will not execute. Use this if the job was queued by mistake or is no longer needed.
  • Delete — Permanently removes the job record from the system entirely. Unlike Cancel, this also clears the job from the job history log. This action cannot be undone.

Actions for Failed Jobs

When a job has a Failed status (all execution attempts exhausted without success), two action buttons are available:

  • Retry — Re-queues the job for another round of execution attempts. Use this after you have identified and resolved the root cause of the failure (e.g., a PHP error, missing data, or a plugin conflict).
  • Delete — Permanently removes the failed job from the system. Use this when the job is no longer relevant or cannot be fixed.

Creating Custom Cron Jobs

Add New Job

Field Description
Job Name Unique identifier
Hook WordPress action hook
Schedule Frequency (hourly, daily, etc.)
First Run When to start
Arguments Optional parameters

Available Schedules

Schedule Interval
Every Minute 1 minute
Every 5 Minutes 5 minutes
Every 15 Minutes 15 minutes
Hourly 1 hour
Twice Daily 12 hours
Daily 24 hours
Weekly 7 days
Monthly 30 days

Custom Intervals

Add custom intervals via code:

add_filter('cron_schedules', function($schedules) {
    $schedules['every_three_hours'] = [
        'interval' => 10800,
        'display' => 'Every 3 Hours'
    ];
    return $schedules;
});

Cron Configuration

WordPress Cron Settings

Setting Description Default
Enable WP-Cron Use WordPress cron system Enabled
Alternate Cron Use alternate cron method Disabled
Cron Lock Prevent simultaneous runs Enabled

Server Cron

For high-traffic sites, use server cron instead:

  • Disable WP-Cron in wp-config.php:
define('DISABLE_WP_CRON', true);
  • Add server cron job:
# Run every minute
* * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

Or with WP-CLI:

* * * * * cd /path/to/wordpress && wp cron event run --due-now > /dev/null 2>&1

Error Handling

Retry Settings

Setting Description Default
Auto Retry Retry failed jobs Enabled
Max Retries Number of retry attempts 3
Retry Delay Wait between retries 5 minutes
Exponential Backoff Increase delay each retry Enabled

Common Errors

Error Cause Solution
Timeout Job takes too long Increase timeout or optimize
Memory Exceeded memory limit Increase limit or batch process
Lock Another instance running Wait or clear locks
Missing Hook Action not registered Check plugin activation

Debugging

Debug Mode

  • Go to Cron Jobs Settings
  • Run the job
  • Check debug log

Log Location

Cron logs are stored in:

/wp-content/uploads/wpdm-cache/logs/cron-{date}.log

WP-CLI Commands

# List all cron events
wp cron event list

# Run specific event
wp cron event run wpdm_activity_report

# Run all due events
wp cron event run --due-now

# Delete an event
wp cron event delete wpdm_custom_job

Performance Tips

Optimization

Tip Description
Batch Processing Process large datasets in chunks
Off-Peak Scheduling Run heavy jobs at low-traffic times
Use Server Cron More reliable than WP-Cron
Monitor Memory Watch for memory leaks

Resource Limits

Setting Description Default
Max Execution Time Seconds before timeout 300
Memory Limit Maximum memory usage 256M
Concurrent Jobs Max simultaneous jobs 2

Security

Job Access

Setting Description
Nonce Verification Verify job authenticity
Capability Check Required user capability
IP Whitelist Allowed trigger IPs

Audit Log

Track who manages cron jobs:

Event Logged Data
Job Created User, time, job details
Job Modified User, changes made
Job Deleted User, job that was deleted
Manual Run User, job executed

Tips

  • Use server cron for production sites
  • Monitor job execution times
  • Review logs regularly
  • Test jobs in staging first
  • Avoid overlapping schedules
  • Always investigate the cause of failed jobs before using Retry, as retrying without fixing the underlying issue will likely result in another failure.
  • Use Run on pending jobs with caution in production environments, as it may trigger emails, order updates, or other side effects immediately.
  • The Delete action is irreversible — the job record cannot be recovered once deleted.

Related Documentation