Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Endlessly spawning cron jobs...

Ever since upgrading to Catalina, I've been having a problem where, after a few days, open programs will stop responding to many inputs, and attempts to run other programs (including basic Apple programs like Safari) will fail saying that the application "can't be loaded".


I've stripped the OS down to the basics, with no startup apps running, and I've tried to see if there's anything hinky in the Activity Monitor.


What I've found is that it seems there will slowly but surely be the accumulation of increasing numbers of "cron" and "mdworker_shared" processes, climbing up into the triple digits. Turning off almost all Spotlight features seems to stop the endless proliferation of "mdworker_shared", but cron jobs continue to grow and grow and grow.


Any suggestions or ideas what is going on here, or even how to get to the bottom of it?



Mac mini 2018 or later

Posted on Oct 26, 2019 2:19 PM

Reply
Question marked as Best reply

Posted on Nov 1, 2019 5:56 AM

I think I have a solution, and I'll tell you why I think it worked. Maybe someone here that is more savvy with *nix systems can see if I'm right.


I tried uninstalling almost everything from my system that wasn't "stock" -- Arq, ClamXAV, Citrix, Dropbox, almost everything that had a kext, loaded at start-up, or seemed to get into the guts of my computer.

Nothing. No matter what I uninstalled, it seemed that cron spawning happened over and over.


I reinstalled Catalina. Again, the endless cycle of spawning happened.


I figured I was thinking about things the wrong way, so I changed my approach and started thinking about cron in general.


So, "cron" has been deprecated in MacOS, wherein "launchd" really handles those type of regularly occurring tasks. Nobody needs to run a cron job under Darwin. Really, it shouldn't have to be running on any Mac.


Also, if you look in Activity Monitor, you'll perhaps see that ALL those cron jobs were spawned by a single cron job...which in turn, has the parent process of launchd. At least it was for me.


After digging a little, I uncovered an interesting fact -- launchd will spawn a cron job if it finds anything in /usr/lib/cron/tabs. Thinking about this, I rebooted my mac into a fresh Guest account, and looked through Activity Monitor. Guess what? NO cron jobs running, at all.


So, something was installed in my Mac (and perhaps yours, too) that makes a call to an out-of-date process, and is probably old or badly coded. After thinking about it, I was left with two choices: I could erase the entire drive, do a fresh install of MacOS and reload my programs and files, or...


I could eliminate whatever offender was likely hiding in /usr/lib/cron/tabs.


I looked through the directory as best as I could, but I couldn't really decipher the culprit.


After careful consideration, making a backup, and understanding that I may hose my system and require a fresh wipe and reinstall, I nuked the entire /usr/lib/cron/tabs directory.


And... it worked. No problems since then. Been several days now. I turned Spotlight back on, readded pretty much everything I had been running before Catalina, and no blips or errors at all.


I'm not suggesting that my answer is the completely correct one, but it seems to have worked for me.


I'd be interested to hear what anyone else has to add or say to this saga, since I'm in healthcare, and not a computer guru. I'd be pleased to be more thoroughly educated, and if I did something wrong, I'd love to know that too.



Similar questions

12 replies
Question marked as Best reply

Nov 1, 2019 5:56 AM in response to Matteon

I think I have a solution, and I'll tell you why I think it worked. Maybe someone here that is more savvy with *nix systems can see if I'm right.


I tried uninstalling almost everything from my system that wasn't "stock" -- Arq, ClamXAV, Citrix, Dropbox, almost everything that had a kext, loaded at start-up, or seemed to get into the guts of my computer.

Nothing. No matter what I uninstalled, it seemed that cron spawning happened over and over.


I reinstalled Catalina. Again, the endless cycle of spawning happened.


I figured I was thinking about things the wrong way, so I changed my approach and started thinking about cron in general.


So, "cron" has been deprecated in MacOS, wherein "launchd" really handles those type of regularly occurring tasks. Nobody needs to run a cron job under Darwin. Really, it shouldn't have to be running on any Mac.


Also, if you look in Activity Monitor, you'll perhaps see that ALL those cron jobs were spawned by a single cron job...which in turn, has the parent process of launchd. At least it was for me.


After digging a little, I uncovered an interesting fact -- launchd will spawn a cron job if it finds anything in /usr/lib/cron/tabs. Thinking about this, I rebooted my mac into a fresh Guest account, and looked through Activity Monitor. Guess what? NO cron jobs running, at all.


So, something was installed in my Mac (and perhaps yours, too) that makes a call to an out-of-date process, and is probably old or badly coded. After thinking about it, I was left with two choices: I could erase the entire drive, do a fresh install of MacOS and reload my programs and files, or...


I could eliminate whatever offender was likely hiding in /usr/lib/cron/tabs.


I looked through the directory as best as I could, but I couldn't really decipher the culprit.


After careful consideration, making a backup, and understanding that I may hose my system and require a fresh wipe and reinstall, I nuked the entire /usr/lib/cron/tabs directory.


And... it worked. No problems since then. Been several days now. I turned Spotlight back on, readded pretty much everything I had been running before Catalina, and no blips or errors at all.


I'm not suggesting that my answer is the completely correct one, but it seems to have worked for me.


I'd be interested to hear what anyone else has to add or say to this saga, since I'm in healthcare, and not a computer guru. I'd be pleased to be more thoroughly educated, and if I did something wrong, I'd love to know that too.



Nov 1, 2019 7:23 AM in response to Don Macron

Glad it worked out for you, Don.


Unfortunately, I don't appear to have a /usr/lib/cron/tabs directory! Or any directory called cron or tabs!


"mdworker_shared" processes have fluctuated between 9 and 17, "cron" processes are up to 147.


Finder crashes searching for the above directories. Other apps frequently hang for 5-10 seconds whilst the colour wheel of doom does its thing.

Nov 3, 2019 9:45 AM in response to Don Macron

Using Finder, can't find anyplace to view "hidden" files.


Downloaded latest "Catalina" update, changed somethings:


"mdworker_shared" processes still at 17

"cron" processes dropped dramatically to 29

but

"MTLCompilerService" processes have risen to 66!


Also, went to check "Security & Privacy" settings and got a "Preferences Error", "Could not load Security & Privacy preference pane." which is obviously a new concern.


Mac running very slow when switching between apps.


Catalina is not in my good books.

Nov 3, 2019 10:29 AM in response to Don Macron

I have the same problem.

But it occurs only if the Macbook Pro is plugged to energy and is not used for about 10 minutes.

Then the Fans go wilde, the display gos to sleep but the Macbook get hotter and the fans never ends.

After about 1 hour of fan-activity it gos to sleep.


In Battery mode all is normal.

i have a fresh installed Catalina System on Macbook Pro (mid 2012)


If the Macbook Pro is plugged in to energy and i put the energy settings in the energy panel to sleep after 3 minutes,

the macbook gos to sleep after this 3 minutes, because its before this cron jobs begins to work.

If i put it to sleep from Apple menu, it also works.


ps, sorry for my bad english :-)


Nov 3, 2019 11:04 AM in response to Matteon

I have now unhidden /usr/lib/cron/tabs directory, but there's nothing in it!


The cron directory is actually a shortcut to /private/var/at but all folders are empty with only two files in the root directory at.deny and cron.deny which relate to Linux.


So, why are processes running if there are no jobs?


"mdworker_shared" processes 11

"cron" processes 31

"MTLCompilerService" processes 60


MTLCompilerService processes are Apple's Metal graphics support services for 3D graphics, I'm not using specific graphics apps apart from Safari, so not sure how that would affect me.


FYI system is late 2013

Processor: 2.9 GHz Quad-Core Intel Core i5

Memory: 8 GB 1600 MHz DDR3

Nov 3, 2019 11:29 AM in response to Don Macron

Thanks, Don.


iMac (21.5-inch, Late 2013)

Processor: 2.9 GHz Quad-Core Intel Core i5

Memory: 8 GB 1600 MHz DDR3


Now, I can see hidden folders, there is no /etc/crontab directory.

The /usr/lib/cron/tabs directory is empty 0 bytes, and I can't delete it even if I want to!


I've been listing current processes in most posts:


"mdworker_shared" processes 19 - fluctates

"cron" processes 34 - slowly rising

"MTLCompilerService" processes 56 - slowly dropping

Endlessly spawning cron jobs...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.