More information in the scheduled cron jobs

It would be nice to see more info in the scheduled cron posts so that we can deduce any errors faster. For example - I have a listing that keeps getting deleted, not sure if it’s a plugin conflict or not - however the expiration date in both the default settings and the listing is way off in the future and it keeps auto-expiring.

Hi,

Unfortunately, this feature is not available since the schedule has one job for several actions, and we hope that this feature will be added to the scheduled action side. If the issue still persists, please describe it in more detail. For example, if a listing expires, it shouldn’t be deleted but moved to draft status. Does it work this way?

Hello Millie !

Using the WP Crontrol plugin would give you more insights about what’s happening.

Some other plugins might be useful too.

It was not going to draft status first, it was going straight to trash, and sending the expired listing message. I wrote a wp_trash_post hook that stopped posts from going to the trash and then it started going to draft. I updated the expiration dates again (though it was originally way off in the future in the first place so should have never been auto expiring) and it stopped going to draft, and I left the following in place.

add_filter('wp_trash_post', function ($post_id) {
    if ($post_id == 2319) {
        // Log stack trace
        error_log("Blocked trashing for post ID {$post_id}. Stack trace:");
        error_log(print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true));

        // Stop execution completely
        wp_die("You cannot trash this post.");
    }
    return $post_id;
}, 1);