> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.serverfreak.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Replace the WordPress Cron with a Real Cron Job

At times, you may want to substitute constant file execution with a real cron job. First, you need to disable the script to be executed every time someone loads one of your pages. To do this, open the wp-config.php file in your main WordPress folder and add the following line before the "/* _That's all, stop editing! Happy blogging._ */" line:

**define('DISABLE_WP_CRON', true);**

Once you do that, you need to setup a real cron job and execute the wp-cron.php file with it. You don't want to trigger it too often - 30 minutes should be fine for most of the websites. To do this, login to your cPanel and go to the **Cron jobs** tool located in the **Advanced** section.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/0d191934-9ec5-403f-8502-973fa11bea24.png)


Then, add the following command to be executed every 30 minutes:


wget -q -O - http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1


Replace **yourdomain.com** with your actual domain name. The **Cron jobs** tool has some of the most common schedules preset, so you can just select **Every 30 minutes** from the minutes drop-down and place a " ***** " symbol in the others.

![](https://storage.crisp.chat/users/helpdesk/website/0e35a1b5-ce97-4d12-a27e-1bbafd0ae641/b413ae1e-c853-4abb-96cd-4ff3874b3e98.png)

Remember to click on "Add New Cronjob" to save the changes.