Ahg…solved the problem, but why oh why.
Ok, the solution is to put the add_action outside the function.
function mmd_wpusercleanup_StartProcessingKeepList($nBatch)
{
$args = array('nBatch' => $nBatch);
if (wp_next_scheduled('mmd_ProcessKeepBatch'))
wp_clear_scheduled_hook( 'mmd_ProcessKeepBatch' );
$Status = wp_schedule_event( current_time('timestamp'), 'MMD_cleanupevent', 'mmd_ProcessKeepBatch', array( $args ) );
}
// GOES HERE INSTEAD.
add_action( 'mmd_ProcessKeepBatch', 'mmd_wpusercleanup_ProcessKeepBatch' );
Hopefully this can help someone else.
Related Posts:
- Add self-closing shortcode button to TinyMCE in WP 4.6
- How Do I Use jQuery UI In My Plugin
- Checking if a file is already in the Media Library
- How to implement add_image_size in a plugin
- How to make dynamically-generated content searchable in WordPress?
- Nav Menu meta failing to import
- How do I conditionally enqueue script for CPT single post type with plugin?
- Is it possible to remove next-post / previous-post with out creating a custom template?
- wp_localize_script $handle
- Escaping built-in WP function return strings
- Custom Rewriting to Plugin with Parameters
- Help adding image upload functionality to widget
- ERROR: Options page not found – saving settings page with tabs
- Script won’t load via plugin class
- How to override a function call in functions.php?
- Is there a need to do apply_filter(‘widget_title’, $instance[‘title’]) or any other ‘widget_xxx’ filters?
- Passing array of strings to a SQL statement in a WordPress plugin
- Add multiple shipping rates from add_rate function with custom ID
- How can I render shortcode so that its not cached by Caching plugins?
- Does WordPress support WebP images?
- Sidebar widget to show popular post not working?
- WP_Query returns no results
- On Plugin Activation, How Do I Check for Proper Transport Mechanism?
- Enqueue scripts in footer
- Is It Always a Best Practice to Decouple the Frontend from the Admin Area When Developing a WordPress Application?
- Will setcookie work if there is a cache plugin installed?
- Adding settings link to plugin doesn’t work
- Including the necessary functions for a custom ajax registration form
- Check Paypal Purchase is Success or Not in Easy Digital Download Plugin
- Render content after post title in wp-admin
- Why doesn’t my simple the_title filter get applied?
- WordPress clean internationalization for menus?
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Is it possible to install a theme via a plugin?
- JSX in WordPress Plugin Development
- W3 Total Cache JS and css Minify folder are empty
- Form doesnt save to database
- Wp_list_table search box not working for custom value from database
- Notice: Trying to get property ‘term_id’ of non-object
- How to add user details to different tables immediately after user registration
- Including comments meta box on a plugin page
- include php file if page_id matches
- Optimising a big WordPress site
- How to create custom settings page for custom plugin
- Why wp_die() doesn’t work with wp_redirect but exit() works
- Internationalizing Plugin
- Update File Once Every 30 Days
- Taxonomies within plugin invalid
- Category select options for plugin settings
- Make Database query only when option is updated
- Looking for a better way to initiate cron job
- shortcode executed in the page editor
- Plugin header: WP and PHP version control uses wp_die(), can I change that?
- per blog metadata for plugin
- Completely isolate a plugin view so it doesn’t load the theme
- Does is_admin() really provide a plugin performance improvement?
- Custom Post Type Object – Undefined Variables
- Enqueueing common php scripts in a plugin
- How to translate wordpress backend to another language
- How does “Your comment is awaiting moderation” work?
- How to localize data array in plugin’s option page
- Changing permalink structure breaks link to .php file which generates files dynamically
- How to link to custom “archive like” page with custom permalink rules “dynamically”
- rewrite_rules problem
- Dynamic page generation upon purchase of a product
- Custom post type change permalink query
- Upload product image from frontside for administrator only
- Google Web Core Vitals – management, how to in wordpress and advice
- How to add quick edit on the list of users to edit custom fields?
- How to Run Plugin on Server Without Web Browser
- Hiding the WordPress login and password fields from login page
- Adding customs fields on each product on the cart
- WP Refused to display ‘URL’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’
- Buddypress: adding a new tab direct user to their author page
- Why would one specify multiple arguments when using get_previous_posts_link() which takes only one parameter?
- Unit Testing action hook
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- Integrate separate web app inside wordpress [closed]
- I have a plugin where in I have to change the title of the page dynamically by sending parameter to the_title filter
- PHP includes with AJAX actions
- Custom Post Type and Functions
- WordPress custom plugin developement
- How can I map a specific URL pattern to a plugin for processing
- Issue on Getting Images URL of the Post Gallery
- Google does not index data from custom table used for a plugin
- Best practice: What belongs in theme and what in plugin for large eCommerce website
- I can install my plugin in localhost but not in my server
- ouput buffering confusing me!
- Change the class of wordpress menu
- WordPress.org how to force expire Cached Banner-772×250 from my Plugin page
- What is the Timeline for the Active Version Pie Chart in the Repository?
- How to change url’s in WordPress when changing domain [duplicate]
- Email verification feature in wordpress social login plugin
- Custom Pin it button is not showing over the image instead it shows as block top_left
- check wp_login into a plugin
- Is wordpress plugin development active? [closed]
- How will i add an option under customizer the event calendar section?
- Return custom product in ajax call loop
- Elementor Top-Bar
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?