cancel
Showing results for 
Search instead for 
Did you mean: 

log_clean scheduled task issue

log_clean scheduled task issue

Hi all,

 

I have an issue on my M2 2.3.5-p1 server. The cron_schedule table has an entry in it as follows:

 

11929log_cleanrunningClass log/cron does not exist2020-08-29 00:48:042020-08-29 01:00:00 

 

This log_clean has been in status "running" for many hours. It shows the error "Class log/cron does not exist" in the message column as shown above. 

 

I do note that the directory the log files are stored in for Magento 2 changed in a recent version to var/log/ from log/. However, I am at a loss as to what to do. I have not changed any installation files, not moved any directories from the out the box installation. Therefore the error shown is not of my doing it has just occurred in the way it has.

 

Any help would be most appreciated.

 

Thanks,

Andrew

5 REPLIES 5

Re: log_clean scheduled task issue

Hello @andrew_kitchen 

 

Can you please run 

setup:di:compile

command and check is there any error you get???

 

if yes then please run composer update command. like

composer update

If my answer is useful, please Accept as Solution & give Kudos

Thank you
Anant Prajapati
Magento Certified Developer

Re: log_clean scheduled task issue

i also get this error, and have (first noticed with 2.3.5) both on live and mirrored test site.  Currently on 2.4.1 - have been searching for bugs and only find a few other posts with the same problem with sitemap_generate and log_clean. 

cronerror.jpg

 have tried everything i can think of to get rid of these errors - delete the jobs and they are re-created.  i disabled the sitemap module which looks like the source (the other looks to be part of the default cron job i thin) always still there the following day.

 

"Class log/cron does not exist"

"class sitemap/observer does not exist"

 

annoying as starting to get other messages due to cron being locked up e.g. multiple of below which seem to be because cron is locking up i.e. https://community.magento.com/t5/Magento-2-x-Technical-Issues/Magento2-Serialization-failure-1213-De...

 

Message: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction,

 

 

Re: log_clean scheduled task issue

i am also having this problem  - recurring error in cron_schedule table - status of running (forever)

"class log/cron does not exist"

and 

"class sitemap/observer does not exist"

 

started getting with 2.3.5,  but still getting with 2.4.1. cant find the cause beyond it seems to be in the core magento/default cron modules from what i can tell.  If you delete the errors they are re-created overnight...

 

[Sorry two posts repeated as 1st disappeared to be moderated as spam for some reason, then approved.  Anyway to add to above I tried editing core files to remove the Cron job that gets created every day.  Recompiled everything and deleted the old stuck jobs.  Result: 24 hrs later broken jobs back.  Two observations

- if the sitemap job is deleted, the log_clean job disappears.

-the broken jobs lost with a forward slash - all the other jobs (found using amasty Cron module) are backslashes...

 

 

Re: log_clean scheduled task issue

I think you're using a migrated DB from M1 to M2. I was also running against this issue, seems that there's still this DB record in core_config from M1 which caused this issue. just delete those records and clean the cache Smiley Happy

Screenshot 2020-12-25 at 11.55.35.png

Re: log_clean scheduled task issue

We are using an upgraded instance via the data migration tool.

 

I can see something on your post showing as a triangle - a missing image?

What should I delete from core_config pls?

 

Thanks,