WordPress.org

Ready to get started?Download WordPress

Forums

Backup
Cron Job Scripting (2 posts)

  1. Web-Wrangler
    Member
    Posted 8 months ago #

    Hi, I am using the backup plugin version 2.2

    when I do a backup now from the plugin it backs up just fine.
    the schedule doesn't seem to work. I don't know if it is because of my site being under development and does not have users or is it something with the plugin itself.

    on any case, I would like to execute the backup through a Cron job so I wouldn't have to depend on user traffic for the backup to work.

    I saw some posts here providing commands to enter to the Cron Job in order for the backup plugin to operate via Cron.

    Thing is, my cPanel Cron Job Scheduler seems to allow to run scripts and not commands.

    my question is what kind of script do I need if at all it is possible to make this plugin run through a scheduled Cron Job Script?

    https://wordpress.org/plugins/backup/

  2. XjmoVSB1vScHzW
    Member
    Posted 8 months ago #

    I just redownloaded the plugin to verify the problem was the original plugin and it is.

    The problem with this plugin is so much bigger than "cron not working", it completely breaks all wordpress cron jobs.

    The fixes are below, answering the original question:
    Newest wordpress versions don't seem to need the cronjob tasks, but it might depend on several factors so if you need it you can add the task like this:

    wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    More info here:
    http://wpdailybits.com/blog/replace-wordpress-cron-with-real-cron-job/74

    Fixes:
    For me this had happened 2 times already, so I post the 2 fixes, hopefully it can help anyone:

    first one is probably related to include paths or something, from:

    // Load helper functions
    require_once( 'functions.php' );

    to:

    // Load helper functions
    require_once( dirname(__FILE__) . '/functions.php' );

    second one, I didn't get this problem until after several months after the first one, probably related to the backup being processed right now and taking a while, from:

    if ( get_transient( 'backup_lock' ) )
    				exit; // Exit if another backup process is running.

    to:

    if ( get_transient( 'backup_lock' ) )
    				return false; // Exit if another backup process is running.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags