Project

General

Profile

Actions

Bug #9930

closed

wp_privacy_delete_old_export_files runs a bazillion times

Added by Boone Gorges almost 6 years ago. Updated about 1 year ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
-
Target version:
Start date:
2018-06-14
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

The new privacy features in WP 4.9.6 include a cron job that runs hourly, on each site, to clean up old export files. An hourly run for all 4000 sites on the Commons means that these cron jobs are running nearly constantly.

Realistically, these items almost never need to run. To my knowledge, not a single privacy export has been run on the whole site. I've opened a ticket to improve this behavior in WordPress. https://core.trac.wordpress.org/ticket/44370#ticket

In the absence of a more sophisticated fix upstream, we can safely make a few changes on the Commons:

1. Reschedule all wp_privacy_delete_old_export_files jobs on the Commons so that they run daily (and are spread out) rather than hourly. I'm currently running a script that does just this.
2. Prevent WordPress from scheduling daily privacy exports.

Regarding 2 - the easiest way to do this is to unhook `wp_schedule_delete_old_privacy_export_files()`, but I would like a more general system that we can use for any plugin that tries to schedule an event. I'm going to spend some time trying to build a system, likely by intercepting calls to pre_update_option_cron before Cavalcade kicks in.


Related issues

Related to CUNY Academic Commons - Feature #8987: Migrate away from wp-cronResolvedBoone Gorges2017-12-07

Actions
Related to CUNY Academic Commons - Bug #14299: Remove Site Health scheduled taskResolvedRaymond Hoh2021-04-09

Actions
Related to CUNY Academic Commons - Support #16673: Cloning requestResolvedBoone Gorges2022-08-28

Actions
Related to CUNY Academic Commons - Bug #16889: Broken link checker not workingResolvedBoone Gorges2022-09-24

Actions
Actions

Also available in: Atom PDF