0

I am new with cron jobs and I have to schedule cron jobs. There are a lot of cron jobs in my website which are running randomly but I want all these to run at specific time. Actually I do not want these cron jobs to run at day time and instead I want these to run at night because these are significantly slowing down the server.

Mostly these are firing via plugins so I do not have control over these functions directly. Is there a way to control schedule for these cron jobs. Your help will be much appreciated.

1

you could use something like this, WP Crontrol to see what those events might be and when they are scheduled to run ( interval ), but the time of the day ( when they run ) is controlled by visitors viewing your site ( which is why they run during the day, because that when your site has most traffic). The only way around this is to run it server side or a service that provides such actions.

0

WP Crontrol is a good solution, or you could disable WP-Cron completely and run the cron jobs from the server (or a service like EasyCron) on whatever schedule you want.

To disable WP-Cron, in 'wp-cron.php' add:

define('DISABLE_WP_CRON', true);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.