Troubleshooting Scheduled Events

What events does Gravity Forms schedule?

The following table lists the events Gravity Forms and add-ons schedule with WP-Cron. The timing of event processing varies from site to site.

HookPlugin/Add-OnIntervalDescription
gravityforms_cronGravity FormsDailyDeletes old export and log files.
Trashes or permanently deletes entries (1).
wp_gf_telemetry_processor_cron (2)Gravity Forms (background processor)Daily
(Five Minutes fallback)
Backup processor for telemetry tasks. (3)
wp_gf_upgrader_cron (2)Gravity Forms (background processor)Five MinutesBackup processor for queued database upgrade tasks. (3)
wp_gf_feed_processor_cron (2)Gravity Forms (background processor)Five MinutesBackup processor for queued feeds. (3)
wp_gf_notifications_processor_cron (2)Gravity Forms (background processor)Five MinutesBackup processor for queued notifications. (3)
gravityflow_cronGravity FlowFifteen MinutesProcesses queued workflow steps.
gravityformsauthorizenet_cronAuthorize.netHourlyUpdates entries with the latest status of subscriptions.
gravityformspaypalpaymentspro_cronPayPal Payments ProHourlyUpdates entries with the latest status of subscriptions.
gform_polls_cronPollsHourly (4)Updates the cached poll results.
gravityformssquare_cronSquareHourlyUpdates entries with the latest status of refunds.
gform_square_subscriptions_syncSquareDailyUpdates entries with the latest status of subscriptions.

Event Notes

(1) Entries are only trashed or permanently deleted automatically when configured in the form Personal Data settings.

(2) Some sites may use a different prefix instead of the wp prefix shown in the above hook names.

(3) The background processors schedule backup events as necessary. If the background processor finishes all the queued tasks in one request, it will delete the event. If the event is used, it repeats at a five-minute interval until all the queued tasks have been processed.

(4) The gform_polls_cron_schedule filter can be used to customize the interval.

What is WP-Cron

WP-Cron is the event scheduler included with WordPress. It is used for performing automated tasks.

How are scheduled events triggered?

WP-Cron works by triggering cron.php each time a visitor loads a page on your site. This file checks if there are any scheduled events ready to be processed, and then spawns a new request to the site’s WP-Cron endpoint (e.g., https://example.com/wp-cron.php) to process them.

How can I verify that my site supports scheduled events?

Check the Site Health

Go to the Tools > Site Health page of your site admin and check for the following under Passed tests:

  • Scheduled events are running
  • HTTP requests seem to be working as expected
  • Your site can perform loopback requests

If any of those are not listed under Passed tests, your site might have issues processing scheduled events.

Check the System Status

Go to the Forms > System Status page and check the WordPress Environment section.

Unless you are using a real cron job or an external service, WordPress Cron should be enabled (Yes).

If you aren’t using a real cron job or an external service and logging indicates cron jobs aren’t running, try setting DISABLE_WP_CRON to false in the wp-config.php file.

define( 'DISABLE_WP_CRON', false );

It’s also worth checking, that Background tasks is Yes. If No, that could indicate your site might have trouble contacting itself to process the scheduled events.

Use WP Crontrol

WP Crontrol is a free plugin available in the WordPress plugin directory. You can use it to check for issues with the WP-Cron system, view scheduled events, and manually trigger events.

With the plugin active, visit the Tools > Cron Events page.

The page will display a warning message if WP-Cron is not working (for example, if your server cannot connect to itself to fire scheduled cron events).

If you don’t see a warning message, check the table to see if any of the event hooks from above are listed.

How can I verify that Gravity Forms events are being processed?

Check the System Status

If you are using Gravity Forms 2.7.1 or greater, go to the Forms > System Status page and check the Scheduled (Cron) Events Log section.

Scheduled (Cron) Events Log section of the Forms > System Status page.

This lists up to three of the most recently processed events for each hook included with Gravity Forms (gravityforms_cron, wp_gf_telemetry_processor_cron, wp_gf_upgrader_cron, wp_gf_feed_processor_cron, and wp_gf_notifications_processor_cron).

The Scheduled (Cron) Events Log section won’t be displayed if an event has not been processed recently.

Check the Logs

Begin troubleshooting by:

  • Enabling logging on the Forms > Settings page. Don’t forget to save the settings once logging is enabled.
  • On the Forms > Settings > Logging page, ensure that logging is enabled for Gravity Forms Core and all add-ons.
  • Wait for a day or two.
  • View the logs via the Forms > Settings > Logging or Forms > System Status pages.

Check our logging and debugging documentation for additional help.

gravityforms_cron

To confirm that the gravityforms_cron hook is being processed, you can check the core log for the following logging statements. You’ll find more logging statements between them.

[date and time] - DEBUG --> GFForms::cron(): Starting cron.
[date and time] - DEBUG --> GFForms::cron(): Done.

Background Processors

The backup cron jobs for the background processors shouldn’t need to run, but if they do, you’ll find the following in the core log.

[date and time] - DEBUG --> GF_Background_Process::handle_cron_healthcheck(): Running for [processor_slug].

gravityflow_cron

To confirm that the gravityflow_cron hook is being processed, you can check the Gravity Flow log for the following logging statements. You’ll find more logging statements between them.

[date and time] - DEBUG --> Gravity_Flow::cron() Starting cron.
[date and time] - DEBUG --> Gravity_Flow::cron() Finished cron.

Common Issues

Basic Authentication

If you have basic authentication enabled, the server will return a 401 error if the cron request doesn’t include the authentication credentials. This can be resolved by adding the Authorization header to the cron request using the WordPress cron_request filter, e.g.

add_filter( 'cron_request', 'cron_request_basic_auth' );
function cron_request_basic_auth( $cron_request ) {
    $cron_request['args']['headers']['Authorization'] = 'Basic ' . base64_encode( USERNAME . ':' . PASSWORD );
    return $cron_request;
}

The above example is based on USERNAME and PASSWORD being constants defined elsewhere (i.e., the wp-config.php file), if not, you can include the values within the quotes e.g., 'USERNAME:PASSWORD'.

Delayed Processing

Because WP-Cron relies on page views to trigger processing of scheduled events, this can result in some events not being processed on their scheduled interval for sites with low traffic.

Reliability can be improved by using a real cron job or an external service to periodically contact your site’s WP-Cron endpoint (e.g., https://example.com/wp-cron.php).

In both cases, you’ll need to disable the built-in WP-Cron trigger by adding the following line to your wp-config.php file.

define( 'DISABLE_WP_CRON', true );

Use a real cron job

For hosting environments where you can access the system’s task scheduler, you can configure a cron job to run on the intervals you desire.

Here’s a list of support articles for some of the most commonly used hosts:

If your host isn’t listed above, please contact them for instructions.

Use an external service

The following services can be configured to contact your site’s WP-Cron endpoint on a schedule you define. Some services also include logging and status notifications.

Disclaimer: Third-party services, plugins, or code snippets that are referenced by our Support documentation or in Support Team communications are provided as suggestions only. We do not evaluate, test or officially support third-party solutions. You are wholly responsible for determining if any suggestion given is sufficient to meet the functional, security, legal, ongoing cost and support needs of your project.

Feedback, feature and integration requests, and other functionality ideas can be submitted on our Gravity FormsGravity Flow, or Gravity SMTP product roadmap pages.