• Hi all,
    I am working at a small IT company that host webites among other things. We are hosting our sites on Windows Server with IIS, MySQL and PHP.

    I was asked by a web designer/customer to take a look at why the RSS Aggregator plugin was not importing any items. I quickly discovered that the cron job scheduling did not seem to work, maybe because of the site running on Windows Server? I tested on another site on the same server, same story there.
    I found an article about disabling the built in Cron and scheduling a powershell command, Invoke-WebRequest “https://SITE/wp-cron.php”, and triggering the jobs that way.

    In wp-config.php I added: define(‘DISABLE_WP_CRON’, true);
    I got the plugin to import new items, but then the next time the wp-cron.php loaded, the site broke. All content and theme settings were gone. Even files in wp-content/uploads were gone. I restored the files and database and the site was up running again. To rule out problems with this site alone, I did the same for another site. That one broke as well.

    I found the “define(‘ALTERNATE_WP_CRON’, true);” setting, and tried that out as well. The site broke yet again.

    The sites are running on IIS 10 with php 7.3.11, WordPress 5.4. Themes and plugins differ between the sites.

    Any suggestions to what this might be?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @thex87,

    Not expert in Cron but wanted to help.

    Is your RSS Import too big and is making your server unstable. In few cases, i have experienced that importing large feed can drain your server memory and make it unstable.

    Also, your feed hasn’t been updated from long time as you mentioned so this might have pile up. In this case i suggest you to import rss feed that have few posts and see if that goes fine.

    Thanks

    • This reply was modified 4 years, 9 months ago by Dnesscarkey.
    Thread Starter thex87

    (@thex87)

    Thanks @dnesscarkey for your reply.

    The RSS import is limited to 5 items, so I do not think it is the RSS import that is causing the problem but the changed settings for Cron. This server is quite new and is only hosting about 10 sites, so system resources is not an issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing/disabling cron breaks site’ is closed to new replies.