wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_schedule_single_event [ WordPress Function ]
wp_schedule_single_event ( $timestamp, $hook, $args = array() )
| Parameter: |
|
| Links: | |
| Definiert in: |
|
Ähnliche Funktionen: wp_schedule_event, wp_unschedule_event, wp_reschedule_event, wp_scheduled_delete, wp_get_single_post
Schedules a hook to run only once.
Schedules a hook which will be executed once by the WordPress actions core at a time which you specify. The action will fire off when someone visits your WordPress site, if the schedule time has passed.
Source
<?php
function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
// don't schedule a duplicate if there's already an identical event due in the next 10 minutes
$next = wp_next_scheduled($hook, $args);
if ( $next && $next <= $timestamp + 600 )
return;
$crons = _get_cron_array();
$event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args );
$event = apply_filters('schedule_event', $event);
// A plugin disallowed this event
if ( ! $event )
return false;
$key = md5(serialize($event->args));
$crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args );
uksort( $crons, "strnatcasecmp" );
_set_cron_array( $crons );
}
?>
Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- Function Reference/wp schedule single event « WordPress Codex
Description. Schedules a hook which will be executed once by the WordPress actions core at a time which you specify. The action will fire off when someone ...
codex.wordpress.org - WordPress › Support » Tags — wp_schedule_single_event
(forgot?) Register · WordPress › Support » wp_schedule_single_event ... wp_schedule_single_event not calling my function, 3, afEkenholm, 1 year. Scheduling ...
wordpress.org - wp cron - Using wp_schedule_single_event with arguments to send ...
Apr 22, 2011 ... I'm trying to schedule a pseudo cron job to send an email after a set amount of time utilizing a WordPress plugin. So far, I've been able to make ...
wordpress.stackexchange.com - plugins - What causes wp_schedule_single_event to fire off ...
May 10, 2011 ... This isn't as simple of a question as you may think. Basically I have a C# program that is hitting the worpdress site and the wp_schedule doesn't ...
wordpress.stackexchange.com
Nutzerduskussionen [ wordpress.org ]
- afEkenholm on "wp_schedule_single_event not calling my function"
- foldor on "Scheduling Events within 10 minutes each other"
- bugeyed on "wp_schedule_single_event not calling my function"
- bugeyed on "wp_schedule_single_event not calling my function"
- MattyRob on "Problem using wp_schedule_single_event inside a class"
- upekshapriya on "Problem using wp_schedule_single_event inside a class"
- Kalebeul on "wp_schedule_single_event / wp_schedule_event not working"
- Otto on "wp_schedule_single_event / wp_schedule_event not working"
- Kalebeul on "wp_schedule_single_event / wp_schedule_event not working"
- idealists on "Problem with wp_schedule_single_event"