Does DISABLE_WP_CRON prevent plugins from registering new cron tasks?

Is this assumption valid? Or does DISABLE_WP_CRON actually block crons from running, and block plugins from registering new cron events? Yes, setting DISABLE_WP_CRON to true doesn’t actually block WordPress’ crons from running; it just prevents wordpress itself from initiating the events to run when your backend is triggered by a customer viewing your website. I’m … Read more

how to crate cronjo not depending on user access

Have tried plugins for wordpress cronjob plugins Cronjob Scheduler and SetCron are worthy a shot… my personal favorite is Cronjob Scheduler.. with cronjob scheduler Running your cron tasks Most shared providers offer a crontab manager, or you can speak to your shared hosting provider about setting up our cron job. If you manage the server, … Read more

wp-cron not working

function cron_daily_whatever() { if (!wp_next_scheduled(‘check_daily_event’)) { wp_schedule_event(time(),’daily’,’check_daily_event’); } } function check_daily_event() { error_log(‘check’); } add_action(‘wp’,’cron_daily_whatever’); add_action(‘check_daily_event’,’check_daily_event’);

Run cronjob with browser request

You’d be better off using the wordpress API: function wp_register_cron_endpoint() { register_rest_route( ‘crons’, ‘/run_cron’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘run_crons’ )); } add_action( ‘rest_api_init’, ‘wp_register_cron_endpoint’ ); function run_crons(){ /*** Do whatever you want ***/ } Then you can hit http://example.com/crons/run_crons and you’ll A)Trigger wp_cron based on the wp_load and B) Do whatever you want … Read more

Regenerating array key for wp_schedule_event args

So what I came up with, which seems to work is the following: This function will search by the user id and find the corresponding cron job function search_user_cron( $hook, $user_id ) { $crons = _get_cron_array(); foreach( $crons as $timestamp => $cron ) if( isset( $cron[$hook] ) ) foreach( $cron as $jobs ) foreach( $jobs … Read more

Cron jobs repeating themselves

The wp_schedule_single_event function in cron.php (http://core.trac.wordpress.org/browser/tags/3.7.1/src/wp-includes/cron.php#L0) has a comment which says: // don’t schedule a duplicate if there’s already an identical event due in the next 10 minutes So I’d say that no it won’t trigger lots of calls for earlier in the day.