How to Set New Schedule for Import Cron Jobs in Feedzy?
π Note: This feature is available only in the premium version of Feedzy, which you can get from here.
WordPress's first cron execution time depends on setting up the scheduled tasks. This means that when a visitor enters your website, WordPress checks if any scheduled tasks need to be executed first, such as scheduling posts for publication or verifying if there are any available updates.
To make sure that a scheduled task is executed at a specific time, Feedzy allows you to schedule the first cron execution time.
To add a new frequency (schedule) option in the dropdown, you can use one of these options:
Using a Feedzy filter |
Using the WP Crontrol plugin |
βοΈ Using a Feedzy filter
- 1
Navigate to Plugins > Plugin File Editor.
- 2
Select Feedzy RSS Feeds Premium from the list and click the Select button.
- 3
Paste the below filter into the currently active theme functions.php file or Code Snippets to add new frequency options.
function fz_add_cron_interval( $schedules ) { $schedules['every_2_hours'] = array( 'interval' => 2 * HOUR_IN_SECONDS, 'display' => esc_html__( 'Every 2 Hours', 'feedzy-rss-feeds' ), ); return $schedules; } add_filter( 'cron_schedules', 'fz_add_cron_interval' );
π Note: Here, we have added a new interval of 2 hours, but you can change the interval and display as you need.
πNote: If you paste the code snippet into the plugin's source file, the changes will be lost when you update the plugin. The same thing may happen when you update the theme, this is why we recommend using a child theme.
π‘Result
π Note: Please also select the First cron execution time to be set in the past for the schedule to work.
𧩠Using the WP Crontrol plugin
- 1
Navigate to Plugins > Add New.
- 2
Search for the WP Crontrol plugin and install it.
- 3
Navigate to Settings > Cron Schedules and fill in the details for the new interval:
π Note: On the right side, you will be able to see the WP default cron intervals, but also the ones added with the above filters and the ones added with the WP Crontrol plugin.
- 4
Click on the Add Cron Schedule button. The new interval will appear on the right side but also under Feedzy's settings.
π‘Result
π Note: Please also select the First cron execution time to be set in the past for the schedule to work.