{$this->identifier}_cron_interval

Description

Gravity Forms includes a filter for controlling the cron interval of background processing classes that extend the GF_Background_Process class. The {$this->identifier}_cron_interval filter allows developers to override the default schedule for asynchronous tasks, such as processing feeds or handling notifications.

This filter is dynamically generated based on the identifier property of the background process class. The identifier is constructed by combining the class’s $prefix and $action properties.

Identifiers

ClassFilter NameDefault Value
GF_Feed_Processorwp_gf_feed_processor_cron_interval5 minutes
GF_Background_Upgraderwp_gf_upgrader_cron_interval5 minutes
GF_Notifications_Processorwp_gf_notifications_processor_cron_interval5 minutes
GF_Telemetry_Processorwp_gf_telemetry_processor_cron_interval5 minutes

Usage

add_filter( 'wp_gf_feed_processor_cron_interval', function( $interval ) {
    return 10 * MINUTE_IN_SECONDS; // Set interval to 10 minutes
} );

Parameters

ParameterTypeDescription
$intervalintegerThe interval in seconds between scheduled executions. Default is 5 * MINUTE_IN_SECONDS unless overridden by the class property $cron_interval.

Default Behavior

Each subclass of GF_Background_Process can define its default interval by setting the $cron_interval property. If this property is not set, the fallback default is 5 minutes.