Black Friday: Up to 40% off all plans!

Offer automatically applied at checkout
Days
Hours
Minutes
Seconds

FAQs

Find answers to common questions and step-by-step solutions.

Glossary

An alphabetical list of terms and their definitions.​

Video Library

Discover our tutorials

This help doc applies to version 4. If you’re using version 5, please refer to the updated documentation here.

How to Add a Custom Cron Interval

Contents

WP RSS Aggregator, by default, provides a list of cron intervals for scheduling your feed imports. Although these work for the majority of users, you may want a different schedule.

Use the below code to add a new cron and see it show up in the list shown in the WP RSS Aggregator settings. You can set the number of seconds and the display name as you wish.

add_filter( 'cron_schedules', 'cron_add_weekly' );


function cron_add_weekly( $schedules ) {
   // Adds once weekly to the existing schedules.
   $schedules['weekly'] = array(
    'interval' => 604800, // 60sec*60min*24hours*7days
    'display' => __( 'Once Weekly' )
   );
   return $schedules;
}

IMPORTANT: To learn how to add this code to your site, please visit our tutorial here.

GIVE FEEDBACK

Was this article helpful?

Still stuck?

Find Your Perfect Plan

Answer a few questions, and we’ll recommend the best option for you!