System Cron job not firing

You need to first create the interval for 30 mins. Use filter: add_filter(‘cron_schedules’,’my_cron_schedules’, 999 ); function my_cron_schedules($schedules) { $schedules[‘thirty_min’] = array( ‘interval’ => 1800, // Every 30 mins ‘display’ => __( ‘Every 30 mins’ ), ); return $schedules; } Then you need to execute the scheduled job: wp_schedule_event( time(), ‘thirty_min’, ‘your_event_hook’ ); Then add the … Read more

Sync user meta fields using Wp cron job

If you want to remove the functionality of the original plugin, try adding this to your theme’s functions.php file function add_thirty_day_cron($schedules) { $schedules[‘thirtydays’] = array( ‘interval’ => 30 * DAY_IN_SECONDS, ‘display’ => __( ‘Every 30 days’) ); return $schedules; } add_filter(‘cron_schedules’,’add_thirty_day_cron’);//adds 30 day interval add_action(‘do_meta_sync’, ‘my_meta_sync’);//hook for cron function my_meta_sync() { if (function_exists(‘msf_action_callback’)) msf_action_callback(); } … Read more

WP Cron jobs loops infinitely

I usually define a IF state and use wp_clear_scheduled_hook function. See example: if (get_option(‘atenasupervisor_scheduler’) <> ‘Stop’) { echo ‘Active (‘. get_option(‘atenasupervisor_scheduler’).’)</strong></div>’; } else { wp_clear_scheduled_hook( ‘atenasupervisor_my_email’ ); echo ‘Not active (‘. get_option(‘atenasupervisor_scheduler’).’)</strong></div>’; } “

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)