@shoestringwebs i’ve got the same problem with a newsletter plugin, and on internet i didn’t find a solution, and i’ve figured it out from myself.
First your wp-cron.php is not working and still present in root dir of your site.
So follow my steps and tell my if works for your, for me did:
1. Save the following code in a file called wp-cron2.php on your desktop.
<?php
/**
* WordPress Cron Implementation for hosts, which do not offer CRON or for which
* the user has not set up a CRON job pointing to this file.
*
* The HTTP request to this file will not slow down the visitor who happens to
* visit when the cron job is needed to run.
*
* @package WordPress
*/
ignore_user_abort(true);
if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )
die();
/**
* Tell WordPress we are doing the CRON task.
*
* @var bool
*/
define('DOING_CRON', true);
if ( !defined('ABSPATH') ) {
/** Set up WordPress environment */
require_once('./wp-load.php');
}
if ( false === $crons = _get_cron_array() )
die();
$keys = array_keys( $crons );
$local_time = time();
if ( isset($keys[0]) && $keys[0] > $local_time )
die();
foreach ($crons as $timestamp => $cronhooks) {
if ( $timestamp > $local_time )
break;
foreach ($cronhooks as $hook => $keys) {
foreach ($keys as $k => $v) {
$schedule = $v['schedule'];
if ($schedule != false) {
$new_args = array($timestamp, $schedule, $hook, $v['args']);
call_user_func_array('wp_reschedule_event', $new_args);
}
wp_unschedule_event($timestamp, $hook, $v['args']);
do_action_ref_array($hook, $v['args']);
}
}
}
die();
2. Upload the file using cPanel file manager or using a FTP program to the root of your site, near wp-cron.php
3. You have to open wp-config.php and add this
/** Stop Cron jobs automatically
define('DISABLE_WP_CRON', 'true');
define('ALTERNATE_WP_CRON', 'true');
between lines 36-41 to take effect.
4. Open cPanel>Cron Jobs and set up this 2 jobs
wget -q --delete-after "https://yourdomain/wp-cron2.php?doing_wp_cron"
wget -q --delete-after "https://yourdomain/wp-cron2.php"
Replace yourdomain = your site URL = ex. www.remarpro.com
For me is ok to check wp-cron2.php on every 30 minutes. If you want to do this more often do it.
Why
-q = run the wget in silent mode, you are not receiving emails about cron job with info. If you want to debug delete it to see the message error.
–delete-after = after running a wget command a called file would be saved in the root of your domain with 0 bytes, and this commands removes it.
My recomandation for you for a newsletter plugin. It’s very complex, standalone plugin with wysiwyg, easy to configure and set-up and you have stats for subscribed, clicked, opened, unopened posts. Really helpfully.
Cheers,
ionica.