Tag Info

New answers tagged

0

I had the same problem. My solution was to define the timeout constant for the cron job by adding this line in wp-config.php: define('WP_CRON_LOCK_TIMEOUT', 60); I added this before the line require_once(ABSPATH . 'wp-settings.php'); and it worked. By default this is set to 0.01 seconds, which to me it makes no sense. This line sets it to 60 seconds.


0

your cron must be register at the plugin or theme activation. Try wp crontol plugin to verify and run your cron task. But, i think you call "minutes" interval where you might call "every_three_minutes" interval for the schedule event.


0

So of course as soon as I post this I find the solution. After looking for it for a day. I had to include the file handling the request_filesystem_credentials manually in the function. For reference this was require ABSPATH . 'wp-admin/includes/file.php';


0

First you can to create a schedule for one minute, then bind function with that hook. function add_new_intervals($schedules) { // add weekly and monthly intervals $schedules['every_single_minutes'] = array( 'interval' => 60, 'display' => __('Every Minute') ); return $schedules; } add_filter( 'cron_schedules', ...


0

Add an action outside your class definition: add_action('my_unique_plugin_event_hook', array($this,'hook')); And then use this in your event: wp_schedule_event(time(), 'daily', 'my_unique_plugin_event_hook');


0

In the simplistic way. Register a filer, embed with action & use it. For quick example: Register an event: // Create new cron job filter add_filter( 'cron_schedules', 'cron_add_five_minute' ); function cron_add_five_minute( $schedules ) { // Adds once weekly to the existing schedules. $schedules['five_minute'] = array( 'interval' => 300, ...


0

After trying everything, this worked for me: global $allowedposttags; $allowedposttags['div'] = array('align' => array (), 'class' => array (), 'id' => array (), 'dir' => array (), 'lang' => array(), 'style' => array (), 'xml:lang' => array() ); $allowedposttags['iframe'] = array('src' => array () ); ...



Top 50 recent answers are included