Scheduled backups sometimes fail even though manual builds work fine. This issue is often related to how WordPress handles scheduled tasks. This article explores the reasons behind canceled scheduled backups and potential factors affecting their execution.
Why do scheduled backups get canceled yet manual builds work fine?
Scheduled backups may be canceled while manual builds work fine due to site traffic conditions. WordPress relies on site visits to trigger scheduled tasks, which can impact the build process.
WordPress does not run active background threads. Instead, scheduled tasks such as Duplicator Pro builds depend on visitor traffic to trigger execution. If site traffic is too low when the build is scheduled, the process may not start or complete properly. The basic workflow is:
- A visitor accesses the site.
- WordPress identifies that a scheduled build needs to run.
- The backup build process begins.
If traffic is inconsistent, scheduled builds may fail or get canceled before completion.
Solutions for Scheduled Build Failures
Adjusting Client-Side Kickoff
In some cases, the Client-Side Kickoff setting may be slowing down the build or causing timeouts. Follow these steps to check and adjust the setting:
- Check whether Client-Side Kickoff is enabled.
- If enabled, disable it and test a manual build.
- Go to Duplicator Pro » Schedule Backups, hover over your schedule, and click Run Now.
- If the backup builds successfully, the issue is resolved.
- If the backup gets stuck or fails, re-enable Client-Side Kickoff and proceed to the next solution.
Setting Up a Remote Cron Schedule
A remote cron job can ensure consistent execution of scheduled builds, especially on low-traffic sites. To set up a remote cron schedule, refer to the guide: How to Make My Scheduled Build Run on Time.
Optimizing Build Settings for Low-Traffic Periods
If traffic is too light when the schedule is triggered, builds can time out. Adjust the following settings:
- Duplicator Pro » Settings » Backups » Processing:
- Set Server Throttle to Off or Low.
- Increase Max Build Time to at least 270 minutes.
- Adjust your scheduled build time to coincide with peak traffic periods.
- If builds must run during low-traffic periods, keep Server Throttle enabled to prevent performance issues.
Resolving Conflicts with Multiple Scheduled Builds
If multiple Duplicator Pro schedules are running on the same server, PHP processes may interfere with each other, causing build failures. Some web hosts limit concurrent PHP processes, which can cause conflicts when multiple sites attempt to build backups simultaneously.
To resolve this issue:
- Adjust the schedule times so that each site builds at a different interval.
- For example, if multiple sites are set to build at 1:00 AM, stagger the schedules by a few hours.
- Monitor build performance and adjust timings if necessary.
By implementing these solutions, you can minimize build cancellations and ensure successful scheduled backups.