Score:0

How to stop cron process without rebooting my server?

br flag

I have tried the following:

drush php-eval "\Drupal::lock()->release('cron');"

This had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log.

I also tried the mysql query:

DELETE FROM semaphore WHERE name = 'cron';

The query ran fine, but had no effect. I'm still seeing "Attempting to re-run cron" errors pile up in the log.

I also checked the processes:

ps aux | grep cron

I saw a number of Drupal-related cron processes, and killed them all.

I then repeated...

drush php-eval "\Drupal::lock()->release('cron');"

None of this has had any effect. I clear the log, and then new "Attempting to re-run cron" errors appear.

leymannx avatar
ne flag
Did you ensure to set the poor man's cron to "execute never" at /admin/config/system/cron?
br flag
That was it exactly. Once I switched that to "never," and then ran the drush command in my question, it stopped.
Score:0
ne flag

Check if the "Automated Cron" core module is enabled. If so, you'll find a setting at /admin/config/system/cron where you can set the so called poor man's cron (cron triggered by site traffic) to be executed "never".

If no other cron has been configured, like a server cron executing drush cron for example or external service that periodically visits the hashed cron URL (which can be found on the same page as the poor man's cron), setting poor man's cron to be executed "never" should then completely stop any cron running on your site.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.