0

We had a module that created 3 specific cronjobs. This module was located in the app/code folder and we recently removed the entire module by removing the folder and then run the upgrade command.

But now when we check magerun2 sys:cron:list we still see that these 3 cronjobs exist. They still run, but will not succeed because the module is removed.

How can we also remove those 3 cronjobs?

1
  • 1. Do you have any extensions for manage cron? 2. Did you flush config cache? 3. Did you try to find this code in exists extensions? Aug 30, 2022 at 18:55

2 Answers 2

1

I suggest you may want to take a look at your redis cache? If the folder has gone, these crons are either on the database

select * from cron_schedule where job_code='';

or also in the cache particularly if you use redis.

2
  • It was indeed the redis cache, thanks Herve!
    – JGeer
    Sep 9, 2022 at 9:18
  • great to hear, thanks for the follow up Sep 9, 2022 at 9:28
0

The normal way of creating a cron job in Magento is by defining it in your module's crontab.xml file. There are however 2 config readers, the standard one for XML but also one to read the config from the DB.

My guess is perhaps the module created the jobs programmatically by writing them into the DB.

Run the following SQL:

SELECT * FROM `core_config_data` WHERE `path` LIKE 'system/crontab/%'

This should show any that were created using the DB method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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