# Wordpress WP-Cron

## What is WP-Cron?

WP-Cron is the build in implementation of cron jobs, within Wordpress. By default, this is only executed if an user visits' your website. But this is inefficient and unreliable, especially for high traffic websites.

## Disabling visitor execution of WP-Cron

You can disable the default visitor behaviour, by adding a constant inside wp-config.php:

```php
define( 'DISABLE_WP_CRON', true );
```

## Setting up a cron job task

### Settings tab

After disabling visitor execution, you can simply add a daily cron job task within Cronly.

Go to `Services` » `Cron jobs` » Click `Add` in the top right.&#x20;

Select a **Project**.

Pick a **name**, that described to monitor. This name is only used within Cronly and doesn't effect implementation.

Select the correct **time zone**. This is the time zone of the environment the cron job runs.

The **schedule** works in the same notation Unix based systems run their cron jobs. For a daily run, use: `0 0 * * *`

When adding a new cron job, the **monitor delay in minutes** is used to automatically configure a monitor for your cron job.

To skip execution of the task, if there is a task still running, set **overlap** to no.

Set a **time-out** in seconds. We currently support a maximum of 5 minutes (7200 seconds).

After adding the cron job task, a monitor is automatically synced with the same details. This monitor is not counted as a monitor for your subscription.

### Endpoint tab

Set the **endpoint** to <https://your-domain.com/wp-cron.php>

All other values can be kept to it's defaults.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cronly.app/integrations/wordpress-wp-cron.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
