Default backup schedule causes server's high resource consumption
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
Research direction
Start in inc/class-option.php, in defaults_job(), where the default cron value is set to 3 AM. Review how new backup jobs consume this value and determine the intended default scheduling behavior from the request. Done means newly created jobs no longer impose the same default time on every installation, with the resulting schedule covered by the project’s available checks.
Written by the indexing model from the issue text.
Description
I have a request for BackWpUp plugin.
BackWpUp's new backup job sets timing to 3 AM on everyday as a default.
So our hosting servers have high resource consumption on the time and it often causes backup process (actually wp-cron.php process) shutdown.
If you don't mind, would you set random(e.g. 1 AM to 6 AM) backup schedule to the plugin or set null to pulldown?
I can't figure out other good solutions sorry. But we are happy to be dispersed backup time.
For example,
+++ wp-content/plugins/backwpup/inc/class-option.php 2019-07-10 13:19:08.000000000 +0900
@@ -195,6 +195,7 @@
public static function defaults_job( $key = '' ) {
$key = sanitize_key( trim( $key ) );
+ $rnd = mt_rand(1,6);
//set defaults
$default['type'] = array( 'DBDUMP', 'FILE', 'WPPLUGIN' );
@@ -204,7 +205,7 @@
$default['logfile'] = '';
$default['lastbackupdownloadurl'] = '';
$default['cronselect'] = 'basic';
- $default['cron'] = '0 3 * * *';
+ $default['cron'] = "0 $rnd * * *";
$default['mailaddresslog'] = sanitize_email( get_bloginfo( 'admin_email' ) );
$default['mailaddresssenderlog'] = 'BackWPup ' . get_bloginfo( 'name' ) . ' <' . sanitize_email( get_bloginfo( 'admin_email' ) ) . '>';
$default['mailerroronly'] = true;```
- Dominant language
- PHP
- Stars
- 95
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wp-media/backwpup
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[HumanSlop] Code Quality Audit: 24574 findings in BackWPup – WordPress Backup & Restore Plugin Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
All issues in wp-media/backwpup
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100