Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 446 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wp_schedule_event not firing

#1
I'm trying to schedule an event inside a theme's `functions.php` but I cannot get it to "fire". I'm using the Cron View plugin and it shows the event scheduled correctly but nothing happened when is time to execute.

This is my code

if ( ! wp_next_scheduled( 'prefix_hourly_event' ) ) {
wp_schedule_event( time(), 'hourly', 'prefixhourlyevent');
}
add_action( 'prefixhourlyevent', 'prefix_do_this_hourly' );

function prefix_do_this_hourly() {
wp_mail('[email protected]','Cron is working', 'Cron is working: ','','');
}
Reply

#2
You can manually run WordPress cron jobs by going to

[To see links please register here]

. This is where you will be able to see any errors that your scripts creates, really useful when debugging wp scheduled tasks.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through