I was having the same issue recently, until I followed an example from the WordPress Codex which suggests using action hooks to run the function.
I think if you add the following…
add_action( 'recalculate_all_scores_hook', 'recalculate_all_scores' );
…and amend the wp_schedule_event function to use the action hook name rather than the function directly…
wp_schedule_event( time(), 'fiveminutes', 'recalculate_all_scores_hook' );
…you might be in business.
Good luck!
Related Posts:
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- What is the use of wp_schedule_event hook?
- How many times will this code run? (or, how rich is grandma?)
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- WordPress Hook for user register
- Using filters and actions for plugin API?
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- wp_schedule_event in a class
- What’s the earliest point I can get the queried object ID?
- How do I Make a Theme “plugin-ready”?
- Problem creating cron job wordpress
- How Do I Make WordPress Run an Event Every Day?
- How can I change the frequency of a scheduled event?
- WP Cron doesn’t save or in post body
- Call activation hook multiple times
- What’s the difference between hooks, filters and actions? [duplicate]
- Two-step login process – Is it possible?
- How to check if certain plugin exists and in expected version
- Plugin development, hooks, generate content
- Hook event for upload image in the menu
- Help with callback using do_action_ref_array
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- Define a function outside a class and call the function using action or filter hook
- Is it possible to modify the media library admin screen?
- What function to hook for changes made in status and visibility of a post
- Order of Operation for these three hooks
- Modifying values with add_action to be sent to db
- Woocommerce – Hide a Column in Cart Table
- save_post hook not triggered in WP v3.6.1
- Hook to get image filename when it is uploaded
- How to display a message about updates in the plugin list
- What is minimum time interval for which a cron be scheduled?
- How to delete an user including data from custom database tables
- Act on user meta updated, but only once
- Should action callbacks start with a verb?
- Execute Hook on the footer or header after activating a plugin
- Why is my javascript not invoked in my hooks except wp_head?
- Namespaced action and filter tags
- What filter should I use to insert a button inside on Media>Add New
- how to add custom functionality after woocommerce place order button
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Conditional hook based on the core function that is calling it
- correct way to call javascript into hook function
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Send push when new post is published in a certain category
- WordPress custom taxonomy check box to dropdown
- Force HTTPS 301 redirect with hook
- WordPress daily cron is executing more frequently than once a day
- wp-cron and execution of code in is_admin() included script
- use of do_action() without any functions attached
- What action hook can I use to add a JavaScript to a page post using a theme template that is not including get_header() nor get_footer()?
- How to Trigger WP CRON at Local Timestamp?
- How to get all queries’s results after they have executed?
- Plugin uninstall function is not working
- Remove an action by extending class and replacing it
- Odd map_meta_cap $args on post edit — sometimes integer, sometimes string
- Trying to get class to instantiate ONCE (or, “why do I keep punching myself in the head?”)
- How can I create a custom plugin that allows anonymous users to signup without registering?
- Bind a function with its own argument to show something dynamically after every content
- What’s the hook for filtering every texts of site?
- Hook add_attachment error
- Will I get an error if I try unscheduling a WP Cron scheduled task that wasn’t scheduled?
- Looking for a better way to initiate cron job
- Update variable value via add_filter
- hook update_option/updated_option empty $old_value and $value
- How to find list of all functions bind to a particular hook from my plugin?
- Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?
- How to make a cronjob type plugin
- Restrict certain actions to plugin-specific admin menu pages only
- How to enhance a self developed plugin by its own plugin architecture
- How to update global variables in plugin activation callback?
- How to Run Plugin on Server Without Web Browser
- `registration_errors` filter doesn’t seem to be called
- How to grab data after wp user search is complete
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- Hook for validating and rejecting frontend image upload
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Nested Hooks with do_action for performance reasons – safe/necessary?
- Problem in plugin debuging in wordpress
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- OOP development and hooks
- remove different admin menu for specific users
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- add_option_{$option} action hook not being called
- plugin modal/popup integration best practice
- Function not working on any file other than the main plugin file
- How can I set a dynamic value for post_updated_messages based on return value of post_updated?
- Can wp_schedule_single_event be used to run background proccess?
- Get user logged in status from within a plugin. $current_user not defined
- Insert plugin html content to a specific spot in the frontpage
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- Send Webhook when post-status is publish or trash
- Using “add_image_size” to register custom image sizes inside plugins not working
- get_term_by() returning null on plugin
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- wp cron does not run when i am not logged in to wp admin
- Custom fields in the billing address section woocommerce
- How to use useSelect to retrieve the currently default fontFamily?