• Resolved lancerlan

    (@lancerlan)


    Hey everyone,

    I recently migrated my hosting server to Cloudways and enabled their customized server-based WP Cron, which is set to trigger every 30 minutes. This resulted in the native WordPress Cron being disabled.

    However, since the WP native cron was disabled, I continue to receive warnings from UpdraftPlus, indicating that backups cannot run:

    I reached out to Cloudways’ customer service, and they provided a modified cron setup as follows:

    */30 * * * * /home/master/applications/danrxadqnz/public_html && /usr/bin/php /usr/local/bin/wp cron event run –due-now

    Despite this adjustment, I’m still receiving the same alerts from UpdraftPlus. Cloudways’ customer service suggested that I obtain a cron from the plugin support:

    If the updraft tasks or schedules are not running with the default wp-cron, please be informed that you need to get a cron from your plugin support so that we can add the cron for it in the cron management section.

    It’s important to note that, despite the warnings, I can see new UpdraftPlus backups in the “existing backups” section every day. The daily backup appears to be functioning normally.

    I’m somewhat confused at this point. I’m not sure if the backup is running as it should, or if there’s an issue as indicated in the warnings. If it’s the latter case, could you please advise me on where to obtain the mentioned cron as suggested by Cloudways’ customer service?

    Thank you for your assistance.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Hi,

    Can you try adding the following to your wp-config.php

    define(‘ALTERNATE_WP_CRON’, true);

    It looks like there is an issue with your site scheduler, this should activate your alternative cron

    Thread Starter lancerlan

    (@lancerlan)

    Hey,

    I tried to add a new line “define( ‘ALTERNATE_WP_CRON’, true);” to the wp-config.php file, but this didn’t resolve the problem, and I’m still encountering the same warnings from UpdraftPlus.

    I also experimented with changing the line “define(‘DISABLE_WP_CRON’, true);” to “define( ‘ALTERNATE_WP_CRON’, true);”. This modification did fix the scheduler problem, and I do not receive warnings from UpdraftPlus anymore. However, there was an unintended side effect: my domain name changed. Initially, my domain was lanceraccessories.com, but after changing “DISABLE” to “ALTERNATE” in the wp-config.php file, my domain transformed into: https://lanceraccessories.com/?doing_wp_cron=1698687683.9295780658721923828125

    I’m seeking guidance on how to rectify this issue. Thank you.

    • This reply was modified 1 year, 1 month ago by lancerlan.
    Plugin Support pbevanudp

    (@pbevanudp)

    Hello,

    Have you reverted your latest change as I am able to reach your domain lanceraccessories.com without any issues?

    In terms of the warnings – if you go to UpdraftPlus > Advanced Tools > Site information > install debugging plugins you will see an entry for WP Crontrol. Clicking this will install this plugin and you can view the cron events in WordPress > Tools > Cron Events and how often they are supposed to run.

    For the first warning – if you have a server-based WP Cron running at specific intervals, such as every 30 minutes, any cron jobs that are set to run at more frequent intervals may be delayed or marked as “overdue” and therefore you will get this warning by virtue of your setup.

    The second warning indicates that backups won’t run unless you have an alternative method for executing these tasks, which you do.

    Thread Starter lancerlan

    (@lancerlan)

    Hello,

    Thank you for the reply.

    Yes I have reverted the change as I want to keep the original domain.

    Regarding the first warning: I followed the instructions and installed WP Control. In the Cron Events section, I observed that there are only four events with intervals more frequent than 30 minutes, but the warning typically indicates that there are between 5 to 8 overdue tasks. Additionally, it shows that there are 10 events with no action, all of which have intervals less frequent than 30 minutes, as shown in the attached image.

    Regarding the second warning: Does this mean we should simply ignore this warning? As previously mentioned, I can see new UpdraftPlus backups in the “existing backups” section every day, suggesting that the daily backup appears to be functioning as expected. However, the recurring warning has left me somewhat puzzled, and I’m uncertain if the backup is actually running smoothly. If this warning is automatically sent to all users whose WordPress native cron is disabled, regardless of whether there is an alternative cron in place, then it would make sense to ignore this warning.

    Plugin Support vupdraft

    (@vupdraft)

    The second warning should go by itself if you have removed define(‘DISABLE_WP_CRON’, true);”

    For the https://lanceraccessories.com/?doing_wp_cron=1698687683.9295780658721923828125, you can add the following to your .htaccess to remove the bit after your URL

    <IfModule mod_rewrite.c>
        Options +FollowSymLinks
        RewriteEngine On
        RewriteCond %{QUERY_STRING} (^|&)doing_wp_cron= [NC]
        RewriteRule (.*) /$1? [R=301,L]
    </IfModule>
    Plugin Support pbevanudp

    (@pbevanudp)

    .

    • This reply was modified 1 year, 1 month ago by pbevanudp.
    Thread Starter lancerlan

    (@lancerlan)

    Hey,

    Regarding the second warning: I replaced define(‘DISABLE_WP_CRON’, true) with define(‘ALTERNATE_WP_CRON’, true), and added codes above in the .htaccess file. This resolved the second warning without causing domain issues. However, it introduced some new problems:

    • I encountered two common errors when accessing pages in the WordPress dashboard

    This page isn’t working // lanceraccessories.com?redirected you too many times. // Try clearing your cookies. ERR_TOO_MANY_REDIRECTS

    This site can’t be reached // lanceraccessories.com?took too long to respond. // Try: * Checking the connection // * Checking the proxy and the firewall ERR_TIMED_OUT

    • Additionally, I received two identical “backed up” emails from UpdraftPlus for the first time, even though it usually sent only one email after completing a backup.

    Due to these new problems, I removed the recently added code from the .htaccess file and reverted ‘define(‘DISABLE_WP_CRON’, true)’ back to its original state in the wp-config file.

    My concern here is whether we can safely ignore this warning. As mentioned earlier, I can see new UpdraftPlus backups in the “existing backups” section daily, indicating that the daily backups seem to be functioning as expected. In this case, does it mean that this warning can be disregarded?

    ____________________________________________________________

    Regarding the first warning:

    I made changes to the cron entry to run it every minute with the following configuration:

    */1 * * * * cd /home/master/applications/danrxadqnz/public_html && /usr/bin/php /usr/local/bin/wp cron event run –due-now

    Despite setting the cron to run every minute, I’m still encountering the same warning sometimes, indicating overdue schedules. My question here is, does this minor backlog actually matter, and will it lead to actual issues on the website? If a few minutes of backlog isn’t critical, can I safely ignore this warning?

    Thank you.

    Plugin Support vupdraft

    (@vupdraft)

    What URL do you have the Cron job going to, it should be : https://yourdomain.com/wp-cron.php?doing_wp_cron

    If you have a Cron job running every minute, you should not really have any overdue tasks. I would keep an eye on this and make sure the number of tasks doe s not start to build up.

    Thread Starter lancerlan

    (@lancerlan)

    Problem resloved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘updraftPlus doesn’t work with server cron job’ is closed to new replies.