4
votes
1answer
245 views

wp_delete_auto_drafts() deletes links in menus

Since yesterday the wp_scheduled_auto_draft_delete cron job somehow deletes all page entries from our menus. All entries in the table wp_postmeta with meta_key = '_menu_item_object' and meta_value = ...
0
votes
0answers
25 views

Break a Wordpress function to run in patches and re-continue

I am new to PHP and coding and I am really not a coder but I try to modify and use existing codes. I have a function which I am trying to run when needed for all users within Wordpress to do an ...
0
votes
0answers
32 views

WPMU schedule doesn't execute actions

Here's a simple event that is correctly scheduled to be executed daily. Unfortuantely, it doesn't execute delete_old_users() function daily. It is supposed to delete users older than a certain date. ...
0
votes
2answers
391 views

How make a php script run only with wp-cron

I have a php script that executes a function and creates an xml file with results. I want this script runs only once daily and i'm using wordpress cron to do this. Problem is this script always runs ...
5
votes
3answers
3k views

Converting timestamps to local time with date_l18n()

I've got a WordPress cron job that sends an email periodically and saves the timestamp when it was sent as an option, and I'd like to display a date on a settings page. Something like, "The last ...
1
vote
2answers
997 views

Initialize WordPress environment to use in a real cron script

I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as ...