Changing/disabling cron breaks site
-
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?
- The topic ‘Changing/disabling cron breaks site’ is closed to new replies.