Title: Maximum script execution time: cron vs manual
Last modified: August 21, 2016

---

# Maximum script execution time: cron vs manual

 *  Resolved [jnicol](https://wordpress.org/support/users/jnicol/)
 * (@jnicol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/)
 * Hi. Firstly I want to thank you for what is undoubtedly the most full featured
   free WP backup plugin 🙂
 * I’m having issues on one of my sites where the backup time sometimes exceeds 
   PHP’s maximum script execution time. To get around this I have tuned BackWPup
   by setting its “Maximum script execution time” option to 120 seconds.
 * When I run the job manually everything works fine:
 * [http://pastebin.com/CF1RD94E](http://pastebin.com/CF1RD94E)
 * However, when run as a WP cron there is no mention in the log of my 120s restarts,
   and the job times out:
 * [http://pastebin.com/rSSfysTY](http://pastebin.com/rSSfysTY)
 * My question is: Is “Maximum script execution time” not honoured for cron jobs?
   If so, is this by design or a bug?
 * WP Version: 3.8.3
    BackWPup version: 3.1.2
 * [https://wordpress.org/plugins/backwpup/](https://wordpress.org/plugins/backwpup/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855404)
 * nomely the maximum execution time will use on cron jobs in same way as on manualy
   starts. Only if you call the script over CLI the execution time setting will 
   be ignored.
 *  Thread Starter [jnicol](https://wordpress.org/support/users/jnicol/)
 * (@jnicol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855429)
 * OK, so it sounds like the max execution time should be working for my cron job.
   Any idea why it’s not?
 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855453)
 * In moment not sorry. Can you test the beta Version from [https://github.com/inpsyde/backwpup](https://github.com/inpsyde/backwpup)
 *  Thread Starter [jnicol](https://wordpress.org/support/users/jnicol/)
 * (@jnicol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855459)
 * Hi Daniel. I tried the latest beta, but had the same results as with the stable
   version:
 * [http://pastebin.com/baK05pan](http://pastebin.com/baK05pan)
 * I aborted the job after the first timeout, but as you can see the 120s max execution
   time has been ignored.
 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855460)
 * Yes, i see it. The Problem is that the Message gets the timout to display and
   the real restart function not gets the timeout or has a other error tht i can’t
   see. It is the same function for manual or for cron run.
 * If the a chaching plugin installed ?
 *  Thread Starter [jnicol](https://wordpress.org/support/users/jnicol/)
 * (@jnicol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855461)
 * I think you are onto something! The sites I’m having problems with are running
   W3 Total Cache, and with W3TC disabled restarts are happening at the max execution
   time, and the backups do not timeout.
 * Do you have any tips for getting BackWPup and W3 Total Cache to play nicely together?
 * However… even with W3TC disabled my cron jobs are now having issues uploading
   to Amazon S3:
 * `ERROR: S3 Service API: The specified upload does not exist. The upload ID may
   be invalid, or the upload may have been aborted or completed.`
 * Manual jobs still complete without errors.
 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855464)
 * Waht for caches of W3TC did you use?
 *  Thread Starter [jnicol](https://wordpress.org/support/users/jnicol/)
 * (@jnicol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855471)
 * Page cache: Disk enhanced
    Database cache: Disk
 * All other settings at their default value.
 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855473)
 * What happend if you disable the database cache.
 *  Thread Starter [jnicol](https://wordpress.org/support/users/jnicol/)
 * (@jnicol)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855475)
 * I think I have it working.
 * What worked for me was to change W3’s Page Cache method from “Disk Enhanced” 
   to “Disk Basic”
 * After that I was able to perform a successful cron backup.
 * Hopefully that information might be helpful for anyone else whose scheduled backups
   are timing out.
 * Thanks for taking the time to see this issue through to its resolution. Your 
   help is much appreciated.
 *  Plugin Contributor [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * (@danielhuesken)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855476)
 * I will also lokk what the differen is and if i can improve somthing.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Maximum script execution time: cron vs manual’ is closed to new replies.

 * ![](https://ps.w.org/backwpup/assets/icon-256x256.png?rev=3236141)
 * [BackWPup – WordPress Backup & Restore Plugin](https://wordpress.org/plugins/backwpup/)
 * [Support Threads](https://wordpress.org/support/plugin/backwpup/)
 * [Active Topics](https://wordpress.org/support/plugin/backwpup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/backwpup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/backwpup/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Daniel Hüsken](https://wordpress.org/support/users/danielhuesken/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/maximum-script-execution-time-cron-vs-manual/#post-4855476)
 * Status: resolved