There is such way, I guess…
When you schedule and event with wp_schedule_event
all you really do is:
Schedule a hook which will be executed by the WordPress actions core
on a specific interval…
And if you’ll take a look at wp-cron.php
then you’ll see, that on line 126 this happens:
do_action_ref_array( $hook, $v['args'] );
OK… So how does it solve the problem?
It does, because you can use all
hook. Actions assigned to that hook are called everytime any filter/action is called.
And you can, at least I believe so, use wp_next_scheduled
to check, if given hook is event hook or not.
Related Posts:
- WP cron doesn’t pass through my arguments
- A unique wp_schedule_single_event() for each post?
- How to test wp_cron?
- Cron jobs in a class
- WP Schedule Event – Every Day When First Visitor Comes
- Why Should We Use wp_clear_scheduled_hook and What it Does?
- Action Scheduler not running
- Dynamic name of cron event
- Can I run a slow action in a seperate thread?
- XML Imported Custom Posts
- WP Cron Doesn’t Execute When Time Elapses
- How to know what priority to use with add_action()?
- Do WordPress cron jobs slow down page loading?
- Running WordPress on the Command Line – Turn off Delayed Output?
- Can my “add_action” function know the name of the hook calling it?
- remove_action in a theme
- add_action ‘manage_posts_custom_column’ in a class [closed]
- Add something to beginning of the content
- Better handling of WP-CRON server load abuse
- When does next Cron Job run (time from now)?
- Get frequency of scheduled event
- When and Where to use wp_insert_post()
- Hourly WP schedule, do I need at least 1 visitor hourly?
- Why?: hundreds of empty files named wp-cron.php?doing_wp_cron.
- Can’t access wp_filesystem in cron function
- WordPress Cron Schedule the if and else statement
- Schedule event every second thursday of the month
- What would cause the ‘wp’ action to fire twice per page (but only once per post) in Firefox only?
- I don’t understand why I need a lower priority to remove an action with a higher priority to make it work
- Auto Delete Users (auto_delete_users)
- Manually add admin bar
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- Is there a way to expose additional fields to the Bulk Action > Edit functionality?
- wp_schedule_single_event function not working
- How do i schedule cron in wordpress for each second?
- Scheduled event won’t fire
- When should I call add_settings_section and add_settings_field?
- Usage of do_action and add_adction
- WP action is not triggering a do_action() call within?
- Mustn’t do_action be accompanied with a function?
- How to set a different value in the generator meta tag?
- Will cron job run if page loaded is being served from cache?
- wp_schedule_event run in background or not?
- remove_action returns FALSE
- Remove action from shortcode
- Write automatic title at save_post (infinite loop)
- Add meta field after post has been published
- Code run fast on a cronjob but slow with a do_action or ajax call
- wp-cron behaviour when there are multiple queued tasks
- Cron job not working – Can’t see in the queue attached
- Set post to unpublished after one week depending on condition
- Action when sidebars updated
- Why does my wp_safe_redirect output the ERR_TOO_MANY_REDIRECTS error?
- How to access author data from header action
- Content won’t load when using action the_content
- How can I unhook this action that was added via $this?
- Update media library image shown in “attachment details” when using wp_insert_attachment to add item to the media library
- How to find where an action is triggered? [closed]
- Create post revision on slug change
- Is dynamic action name building a bad practice?
- Form action unfamiliar
- Why does my delete_post hook get called twice
- Manually running cron from the server
- Cron jobs when running multiple instances on the same DB
- How to Schedule Cronjobs for start of every month and year
- Adding php to form action breaks code [closed]
- WordPress Cron job, 302 response
- WordPress cronjob get scheduled but function does not run
- Is this the correct way to enqueue style sheets from parent theme and then from child theme in wordpress?
- Activity feed on admin dashboard
- action wp_set_comment_status never gets fired when i change the comment status [closed]
- Offloading cron jobs
- Time limit on long cron job?
- Cron: Update four post at Hour
- Change or rewrite add to cart button functionality “
- Better use two dedicated methods hooked with add_action() to different actions, or can it be twice the same method?
- admin_notices is not working inside function
- do_action doesn’t trigger if it’s in a template that gets loaded via REST endpoint
- Best hook for when a user session ends?
- add_action where function has arguments
- Load actions and filters only for the admin CPT list
- Add Action wp_update_post not Updating WYSWIAG editor
- remove action from woocommerce file
- Font Awesome not loaded on first page of website only – divi theme
- WordPress Cron function is not working
- WP_LIST_TABLE bulk action
- WP Cron as Fast as WordPress AJAX?
- Dealing with html forms [closed]
- Cannot Schedule Sending An Email
- setting up a wp cron job
- OOP – add_action
- do_action in header, add action later?
- Adding custom cron_schedule prior to wp_schedule_event
- save post running twice and creating two database entries – how do I disable this?
- Plugin that generates a page of post content
- Cron event running more than once if triggered from WP Crontrol
- Cronjob function not executed – negative seconds
- WP CRON Fails At 13:00 Every Day
- Update last created post in custom post types with wp_cron()?
- Error code 499 on specific cron job