Back to Cron Helper
Recipephpwordpresscmsoptimization

Trigger System WP-Cron

Optimize WordPress by triggering wp-cron via system cron.

Default WordPress cron relies on site visitors to trigger tasks, which can be unreliable. It is best practice to disable the default behavior in `wp-config.php` and use this system cron to trigger `wp-cron.php` every 15 minutes for reliable performance.

Cron Schedule

Every 15 Minutes*/15 * * * *
Runs at minutes 0, 15, 30, and 45 of every hour.

Command to Run

Copy and paste this command into your crontab or automation script

curl -s https://yoursite.com/wp-cron.php > /dev/null
This command will run according to the cron schedule above.

Implementation Examples

Here are code examples for implementing this cron job in different programming languages:
Unix/Linux Crontab
*/15 * * * * /path/to/script.sh
Python (with schedule library)
schedule.every(15).minutes.do(job)
Node.js (with node-cron)
cron.schedule('*/15 * * * *', () => {
  console.log('Running every 15 minutes');
});
Go (with robfig/cron)
c.AddFunc("*/15 * * * *", func() { fmt.Println("Run every 15 mins") })
GitHub Actions Workflow
- cron: "*/15 * * * *"

Related Cron Recipes

Automate PostgreSQL Backups Daily

How to schedule a daily PostgreSQL database backup using cron.
databasepostgresbackup

Automate MySQL Backups Daily

Schedule a daily MySQL database dump using cron.
databasemysqlbackup

Automate MongoDB Backups Daily

How to schedule a daily MongoDB backup using cron.
databasemongodbbackup

Automate Redis RDB Snapshots

Schedule a Redis background save (snapshot) via cron.
databaserediscache

PostgreSQL Vacuum Analyze

Automate PostgreSQL database maintenance with VACUUM ANALYZE.
databasepostgresmaintenance

Sync Folder to AWS S3

Cron job to sync local files to an AWS S3 bucket.
awscloudbackup