• Resolved Bill Kochman

    (@wordweaver777)


    Hello Liuta. It has been a great while since I last communicated with you.

    I started a new topic being as the similar topic was already marked resolved.

    I am having the same exact problem as “wesheadsltc”. About four days ago, I noticed that Xcloner had stopped creating automatic backups about a week earlier. Similar to “wesheadsltc”, I CAN manually create backups.

    I also suspect that the recent WP upgrade broke Xcloner.

    I checked my wp-config.php file, and wp-cron is still disabled, as it should be.

    I use a program called “LaunchControl” to set up cron jobs — or launchd jobs — on my iMac running Mojave.

    When I checked, there was no cron job present for Xcloner in “LaunchControl”. In fact, I don’t even recall having ever created a cron job for Xcloner, yet Xcloner was backing up my blog until about twelve days ago. In fact, neither did I have a .plist file for Xcloner in my library’s “LaunchAgents” folder.

    This is where it gets a little confusing, and I am hoping that you can help me with this.

    You see, I have another cron job set up in “LaunchControl” for another WP plugin that I use. This other plugin is an indispensable part of my setup here. The cron job for this other plugin is set to run every minute, and also uses the “wp-cron.php” file.

    So I am wondering if it is possible that until recently, Xcloner was making automatic backups because this other cron job — which also uses wp-cron.php — was running every 60 seconds.

    At any rate, following the model of how I set up the cron job for the other plugin, I set up a new cron job for Xcloner in the “LaunchControl” app. This new cron job is set to run every 30 minutes, and points to a different .plist file in the “LaunchAgents” folder in my library.

    I honestly don’t know if it is going to work properly or not. Can you use the wp-cron.php file to run two different cron jobs? How does WordPress know what cron job to use with which plugin? Won’t having two jobs using the same wp-cron.php file cause some kind of conflict?

    I understand this stuff very little, so I hope you can give me some guidance.

    BTW, the cron job that I set up for Xcloner is green with an “OK” tag, which means it is set up properly in “LaunchControl”. I just don’t know if it is going to do what I want it to do yet — make automatic WP backups.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • XCloner uses the internal wordpress hooks to create it’s automated scheduled tasks, the only way to verify if it has any is by going in the XCloner Backend -> Scheduler tasks area to see if you have any listing there

    Also please check the XCloner logger from it’s Dashboard, do you see any error message there?

    Thread Starter Bill Kochman

    (@wordweaver777)

    Okay, you just confused me with that reply.

    You wrote the following to the other user in the other thread:

    “I don’t see a notice message regarding cron scheduler execution, are cronjobs properly setup on your site? see this tutorial https://www.siteground.com/tutorials/wordpress/real-cron-job/”

    Are you saying that I don’t need to follow those instructions, and that I don’t need to set up a real cron job, as is described on that web page? As I explained in my OP, that is exactly what I did. I used LaunchControl to set up a real cron job outside of WordPress.

    So, should I delete the real cron job that I set up for XCloner in LaunchControl?

    If I don’t need to set up that cron job there, that would explain why I didn’t see a cron job in LaunchControl when I first checked there yesterday. In fact, as I already said, I don’t recall having ever needed to set one up in there for XCloner, until I did so yesterday, because the instructions on that page gave me the impression that that is what I needed to do.

    My other plugin does in fact need to have a real cron job set up, which is why I have “define(‘DISABLE_WP_CRON’, true);” in my wp-config.php file.

    I in fact had it in the back of my mind that in the early days of Xcloner, we had to set up a cron job ourselves — and it was difficult for me — but in the years since then, it seems that you improved XCloner so that it uses internal hooks, as you just explained.

    But again, I read your comments to that other fellow, and assumed that I had to do the same thing.

    Next question:

    Where is this “XCloner Backend” menu option found? I don’t see it anywhere. Unless my memory is failing me, there used to be an XCloner menu item in WordPress’s dashboard. I no longer see it. What I do see is the following:

    1. Under the “Tools” menu option on the left side of the web page, I see “Cron Events” in the submenu.

    2. Under the “Settings” menu option on the left side of the web page, I see “Cron Schedules” in the submenu.

    If I go to “Tools/Cron Events”, at the top of the page it says “The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.”, as it should, being as I have it disabled in the wp-config.php file.

    In the list on that page, there are two listings that say this:

    xcloner_scheduler_1 [“1”] Xcloner_Scheduler->xcloner_scheduler_callback() 2019-01-23 06:00:00 (11 hours 40 minutes) Twice Daily

    xcloner_scheduler_2 [“2”] Xcloner_Scheduler->xcloner_scheduler_callback() 2019-01-22 23:13:58 (4 hours 54 minutes) Twice Daily

    If I go to “Settings/Cron Schedules”, I see nothing related to XCloner in the short list of items. I only see items related to three other plugins. Should there be something there for XCloner as well?

    If I go to the “Plugins” page in my WP setup, I can select the “Settings” option under the XCloner plugin. That is in fact how I set up my XCloner backups. But again, I have no idea where I am supposed to see “XCloner Backend -> Scheduler”.

    I just looked at the XCloner log. It is currently over 77,000 lines long, all dated from midnight today. Are the times in there my local time? I see a lot of stuff in there related to XCloner, but I see no new backup files in my “wp-content/backups” folder.

    Do you want me to email you a copy of the log file? There is also stuff in there related to my other plugin. Should that be there?

    • This reply was modified 5 years, 10 months ago by Bill Kochman.
    Thread Starter Bill Kochman

    (@wordweaver777)

    I tried to edit my above message, but it wouldn’t let me. Maybe a time limit for editing?

    Anyway, I wanted to add this:

    UPDATE: Okay, so it seems that on WP’s main dashboard page, the “Site Backup” option is actually XCloner, right? But didn’t that option used to say XCloner or something? If so, I think it should still say XCloner, so that the user knows that it pertains to the XCloner plugin.

    If I click on the “Scheduled Backups” option under “Site Backup”, I am taken to a new page where I see similar information as I described earlier:

    2 WordPressBBB Twice Daily in 3 hours
    1 BBB Full Backup Twice Daily in 10 hours backup_www…-04-sql-e7323.tar ()

    That backup file it is showing is in fact that manual backup I did early this morning. It is NOT a scheduled backup file.

    The next scheduled backup will be in just over three hours, but going by what I have already seen, I don’t expect to see a new .tar file in wp-content/backups.

    I would suggest to clear the Scheduled Backups section in XCloner and leave only the schedule you actually want to run. The rest of the setup looks fine

    Thread Starter Bill Kochman

    (@wordweaver777)

    Are you saying that I should delete one of the two scheduled backups that are in there?

    I think the “WordPressBBB” is just a backup of the WP mySQL database and tables

    The second one — “BBB Full Backup” is a backup of everything, which, I suppose is what I really want. That second one is in fact the manual backup I did this morning.

    So do you think having both of them in there is what is causing the backup to not work?

    Also, you didn’t answer my other questions.

    Is the tutorial at https://www.siteground.com/tutorials/wordpress/real-cron-job/ no longer valid or necessary since XCloner now uses internal hooks?

    Should I delete the cron job I made in LaunchControl?

    Am I correct then that “Site Backup” on the WP Dashboard page is actually XCloner?

    If you need them both, then keep them, however you need to determine which one doesn’t work?

    The tutorial is valid https://www.siteground.com/tutorials/wordpress/real-cron-job/ as this is the trigger point of your cronjobs execution, make sure it works

    Yes, delete the cronjobs from LaunchControl, the only place to manage scheduled backups is from XCloner backend

    And yes, Site Backup is XCloner

    Thread Starter Bill Kochman

    (@wordweaver777)

    But neither one of them appears to be working automatically. Maybe I should just delete them both and start all over again.

    I am still confused regarding your second comment regarding the tutorial. It is because I followed those instructions in the tutorial that I set up the cron job in LaunchControl in the first place.

    Now you are saying I should delete the cron job in LaunchControl, because it is all handled internally in XCloner’s WP setup.

    Are those instructions in that tutorial just for people who have their blog on a remote web server, maybe?

    I run my own server on an iMac on my own LAN, but I do manage my blog from a second machine on my LAN, so I access the XCloner setup via my wi-fi network in Firefox.

    Okay, Liuta, if that tutorial is still valid, and if it applies to a person who is running their own web server on an iMac, then it would really, really be helpful if you could write another tutorial which explains exactly how to set up “the trigger point of your cronjobs execution” and “make sure it works” on an iMac.

    That tutorial appears to be written for a Windows person, whose blog is hosted on some remote server. As I said, mine is not. I run my own web server at home, on an iMac, and I manage WP directly on my LAN.

    Thank you. This whole issue just has me frustrated and confused, because it was working fine until just recently.

    • This reply was modified 5 years, 10 months ago by Bill Kochman.

    The trigger point is the execution of /wp-cron.php file and that is done by either a plugin scheduler or a server side scheduler.

    If you are running your website on osx, please check here https://developer.www.ads-software.com/plugins/cron/hooking-into-the-system-task-scheduler/ under osx section

    Hope it helps

    Thread Starter Bill Kochman

    (@wordweaver777)

    Oh, gosh. Liuta, as I previously explained to you, this is what I am ALREADY doing with LaunchControl, but you told me to stop doing it. Can we please continue this discussion via email like we used to do years ago?

    I need to share some information with you regarding my setup here which I really don’t want to make public, being as it involves paths to files on my web server. I need to email you some images of my wp-cron setup, so you fully understand what I have done.

    It has become apparent to me that you are not familiar with what LaunchControl is or what it does, because if you were familiar with it, you would understand why your previous answers have confused me. ??

    I just checked my old machine, but I no longer have your email address on it in Apple Mail. Can you please write to me at [email protected]. I will send you some info which will be to your benefit regarding setting up wp-cron.php on a modern iMac.

    Thank you. I hope to hear from you soon.

    Unfortunately i am not familiar with LaunchControl, so i cannot help you with that.

    Your site could have been creating backups without it if you did NOT have this line in wp-config.php

    define(‘DISABLE_WP_CRON’, ‘true’);

    by default WordPress triggers it’s scheduled crons automatically, but it’s not very reliable.

    If that line is present, then you would need to use a cron scheduler like yours LaunchControl to trigger the wp-cron.php cron execution, and that’s the link to https://www.siteground.com/tutorials/wordpress/real-cron-job/ that explain the process where you add the worpdress cron command to your LaunchControl

    Can you tell me if define(‘DISABLE_WP_CRON’, ‘true’); is currently defined in your site wp-config.php ?

    Thread Starter Bill Kochman

    (@wordweaver777)

    Liuta, please contact me via email as requested. I already have a message prepared to send you, along with several images.

    And, YES, I already clearly told you in a previous comment that I do have wp-cron set to TRUE in my wp-config.php file. Please read further back in this thread. Thank you.

    As I said, I already set up a job in LaunchControl to trigger wp-cron.php. But you told me to stop doing that and to remove it, remember? Read back in this thread.

    Again, please email me. Thanks!

    After checking your log files, it seems your scheduled backups do run, however you run into a memory_limit issue, details below

    [2019-01-23 11:08:05] xcloner_database.INFO: Dumping 10000 records starting position 70000 from wordpressBBB.— table [“”] []
    [2019-01-23 11:08:07] xcloner_database.INFO: Dumping 5456 records starting position 80000 from wordpressBBB.— table [“”] []
    [2019-01-23 11:08:07] xcloner_database.INFO: Dumping the structure for wordpressBBB.— table [“”] []
    [2019-01-23 11:08:20] php_system.INFO: E_ERROR: array ( ‘type’ => 1, ‘message’ => ‘Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)’, ‘file’ => ‘/—-/wp-content/plugins/xcloner-backup-and-restore/includes/class-xcloner-database.php’, ‘line’ => 519, ) [] []
    [2019-01-23 11:08:20] php_system.INFO: E_ERROR: array ( ‘type’ => 1, ‘message’ => ‘Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)’, ‘file’ => ‘/—/wp-content/plugins/xcloner-backup-and-restore/includes/class-xcloner-database.php’, ‘line’ => 519, ) [] []

    I suggest to either increase your memory_limit php.ini setting, or to try and adjust the “Data Size Limit Per Request” setting from XCloner Config->System tab to see if that might fix your problem

    Thread Starter Bill Kochman

    (@wordweaver777)

    I was looking at the XCloner log file and one thing which popped out at me is the out-of-memory error “(Allowed memory size of 134217728 bytes exhausted)” which begins at [2019-01-23 11:08:20].

    In my web server, I looked at my php.ini configuration, and PHP’s memory was 128M. I suspect that my last web server upgrade overwrote my setting of 256M, so I reset it back to 256M again. I don’t know if it helped any, but I also increased the two memory parameters in my “wp-config.php” file as well.

    You will be happy to know that after increasing PHP’s memory allotment, XCloner is now working again. From the looks of it, maybe PHP’s memory being reduced by a web server upgrade was the whole problem all along. To say the least, I am relieved. Not having daily backups is not smart.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Automatic Backups Have Stopped’ is closed to new replies.