UptimeRobot combined with Clean and Lock Extension

My MainWP Dashboard is using the Clean and Lock extension to 301 redirect all regular traffic to my business site. But I realised that Uptime Monitor is redirected as well, so using that to make sure cron jobs will be fired isn’t working (I’ve checked that in the access log). So only when I’ve MainWP Dashboard open (during daytime), these jobs are running.

Is it possible to trigger cron jobs by changing the url UptimeRobot is monitoring? And what would be the best url? I don’t want to use the login url, because that would conflict with my firewall (brute force protection). Should I just use /wp-cron.php or is there a better option?

As nobody replied yet, I’ve tested this for my dashboard site by adding the following monitor to UptimeMonitor:

https://linktomymainwpdashboard/wp-cron.php?doing_wp_cron

and added the following line to my wp-config.php:

define('DISABLE_WP_CRON', true);

and this seems to work and fire background processes like scheduled syncs during the night.

But is this the best option?

1 Like

@josklever Are you able to add these I.P. addresses
to the whitelist of Clean & Lock? I think this will allow access to at least the Login page?

1 Like

I haven’t limited access through that Lock Down screen, but I have security scripts on my server that monitor the access to the login page. If I would use it for UptimeRobot, it would be blocked for “brute forcing the login page”. That’s why I don’t want to use it to monitor the site and trigger cron jobs, as I explained in the last line of my original post.

@josklever I think the way you solved it is your best option then - which I am going to take a wild guess that you got it from here: Wordpress Cron jobs solved – Rik Lewis Which really does sound like the “proper” way to do it without setting up external cron jobs… I almost like that it’s simpler too.

I use Uptimerobot and Clean and Lock but in a different fashion.

  • I use server cron to run my jobs
  • I created a page with a random url and nothing but a . on it for UTR to verify the site is up
  • I set UTR to query that random page
1 Like

@kwcjr I didn’t see that article, but there are a few similar articles and I combined that with my own experience and what I saw in my log files.

@7thcircle If you create such an url, it’s an almost empty .php file? In that case you don’t get a UR notification if the database crashes. If it’s an actual page via WP, it might be unavailable because of the redirect, unless you whitelist the IPs.

The page was created as a WP page with the random url, and then whitelisted in the clean and lock settings.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.