• 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://www.ads-software.com/plugins/backup/

Viewing 1 replies (of 1 total)
  • 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 - https://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    More info here:
    https://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.

Viewing 1 replies (of 1 total)
  • The topic ‘Cron Job Scripting’ is closed to new replies.