Comments Phillip started the conversationMay 22, 2020 at 6:14amcan we run the import for a calendar more frequently than hourly? we have a time critical calendar that we would like updated quicker 793Zhivko repliedMay 22, 2020 at 11:45amHi,1) Go to your theme functions.php file and register new 5 minutes schedule interval: // Adds 5 minute schedule intervaladd_filter('cron_schedules', function($schedules) { $schedules['five_minutes'] = array( 'interval' => 300, 'display' => esc_html__('Every Five Minutes')); return $schedules;});2) Open file stachethemes_event_calendar\assets\php\install\activate.phpedit line 44: wp_schedule_event(time(), 'hourly', 'stec_cronjobs_hourly');to: wp_schedule_event(time(), 'five_minutes', 'stec_cronjobs_hourly'); 3) Deactivate and Re-activate the calendar from Dashboard -> Plugins.Now your hourly schedules will run every 5 minutes.NOTE: Please read how wordpress cron works here: https://developer.wordpress.org/plugins/cron/Tldr: WP-Cron does not run constantly as the system cron does; it is only triggered on page load.To make your cron jobs "real" cron jobs check this article. Stachethemes Developer Sign in to reply ...
can we run the import for a calendar more frequently than hourly? we have a time critical calendar that we would like updated quicker
Hi,
1) Go to your theme functions.php file and register new 5 minutes schedule interval:
2) Open file stachethemes_event_calendar\assets\php\install\activate.php
edit line 44:
to:
3) Deactivate and Re-activate the calendar from Dashboard -> Plugins.
Now your hourly schedules will run every 5 minutes.
NOTE: Please read how wordpress cron works here: https://developer.wordpress.org/plugins/cron/
Tldr: WP-Cron does not run constantly as the system cron does; it is only triggered on page load.
To make your cron jobs "real" cron jobs check this article.
Stachethemes Developer