In your code you have:
if ( isset( $_POST["run_import"] ) ) {
add_action( 'import_execution_event_test', ...
But when wp-cron.php is spawned, there’s probably no POST variable called run_import, so your action is never added, and thus not triggered.
Related Posts:
- Which action for triggering cron “wp”or “init”?
- wp_schedule_event in a class
- WP Cron – Run Cron after evey 15 minutes at a specific time for the next three hours
- Using wp_cron with custom time interval and the register activation hook
- WordPress scheduled task is called but not executed
- 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?
- Hourly WP schedule, do I need at least 1 visitor hourly?
- WP Cron doesn’t save or in post body
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- WordPress cron running twice
- Scheduling a task using class methods
- What is minimum time interval for which a cron be scheduled?
- Will cron job run if page loaded is being served from cache?
- Use wp_set_post_terms() instead of wp_insert_post()
- Programmatically detect if wp-cron is disabled?
- How to schedule a cron job in plugin without waiting for page load request?
- How to perform a heavy and long process in cron jobs?
- WordPress daily cron is executing more frequently than once a day
- wp-cron and execution of code in is_admin() included script
- How to Trigger WP CRON at Local Timestamp?
- wp_schedule_event() set daily, but processed every second
- 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
- WordPress plugin cron working only if admin is logged in
- How to make a cronjob type plugin
- wp_schedule_single_event is set correctly but sometimes not fired
- How to Run Plugin on Server Without Web Browser
- Plugin with functions inside a class & how to trigger WP CRON
- Custom recurrence not working / Wp Cron event
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- WP Cron as Fast as WordPress AJAX?
- Detect each active instance of a widget
- What is the use of wp_schedule_event hook?
- Can wp_schedule_single_event be used to run background proccess?
- Call do_action() within WordPress cronjob
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- wp cron does not run when i am not logged in to wp admin
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Should Plugin Folders Include a Blank index.php File?
- What is the wordpress wp-includes folder for?
- WordPress Update Plugin Hook/Action? Since 3.9
- How come `wp_options` table does not have an index on `autoload`?
- Best way to abort plugin in case of insufficient PHP version?
- Making a plugin file accessible via url rewrite?
- What is the correct way to build a widget using OOP
- Which to use to execute code during the saving of a plugin settings page?
- Overwriting Core WordPress Functions with Plugins
- How do I handle multiple Submit buttons in plugin’s option page?
- add_meta_box() to Category Edit Screen?
- The changes I make to an external JS file of my WP plugin are only applied after I clear my browser’s cache
- How to properly load text domain of custom mu plugin
- How to add quick edit and bulk edit fields to users admin section
- How do I approach removing menu items on the fly based on settings in my plugin?
- Can I use core’s “or Link to Existing Content” feature in my plugin?
- What does $_registered_pages do?
- How do I change the initial quantity of a product in woocommerce?
- Redirect traffic to plugin
- using new WP_Query in save_post function alters $post
- Show special field when correct shipping is chosen
- Custom Taxonomy to dropdown box on adminside wordpress
- On cliking add new post redirect user to a custom page first
- How To Consistently Enforce Rewrite Rule in Plugin Development
- Warning: Cannot modify header information – How to resolve this issue? [closed]
- Create a new post using rest api and save featured image using an external image url
- How to restrict access to image folder depending on whether product is purchased or not?
- Caching the_content calls
- How to hide or rename “X” and “x-child” references in website source?
- Filter Categories widget to allow custom sorting?
- Using WordPress PHP code, how to bulk delete only 100 subscribers at a time from thousands of users?
- Checking a WordPress for OWASP top 10 vulnerabilities [closed]
- hook filter after the_content on a specific page
- The Correct Way to Use Nonce Field without Settings API
- Run command “composer install” when activating wordpress plugin
- Import user data using CSV
- Disable Auto-Expanding Menu in WordPress Admin Menus
- How to submit/upload data to database and in specific folder?
- OOP plugin not working
- Undefined is_user_logged_in() error with Plugin Query code
- Plugin Options not saving options and doesn’t work
- JQuery Slider – Similar to www.internetmarketinginc.com [closed]
- Development plugin to view and manage scheduled wordpress cron jobs?
- Add user managable titles to custom menus?
- WordPress video js error this.mediaElement.play is not a function
- Custom Icon for Plugin
- How can we upload file to root directory of wordpress
- Adding External Gmap JS to WordPress
- First page download plugin
- why is update_user_meta creating arrays when trying to change the same value?
- How to avoid conflict if a plugin already have included open library?
- WordPress OOP get current user question?
- Override WooCommerce files from plugin
- WordPress Dropdown image select
- Unable to link CSS file
- post_results filter confused by pagination in sidebar and main section
- Best place to keep files that are called by cron jobs?
- Settings API with arrays example
- How can I get a plugin to hook ‘dbdelta_queries’ — a filter used during version update?
- Send retrieve password notification email with custom HTML email template