Ubuntu 16.
sudo crontab -e
* * * * * uptime >> /www/w100/log/uptime.log
But nothing happens (uptime >> /www/w100/log/uptime.log work's fine).
grep CRON /var/log/syslog
May 20 21:39:01 cs25795 CRON[28233]: (CRON) error (can't fork)
Why my cron is so buggy? (
If you see the (CRON) error (can't fork) message, it means that:
cron can't create the process (due to high memory)For example, I have a server running with 4 GiB of RAM (3.70 GiB usable), cron wasn't able to start other jobs. I checked my memory using htop and it shown 3.26 GiB used.
What you can do is find out which process is taking up all the memory (using for example htop), kill it and disable it ; or you can just reboot your system. (in my case it was a bot that used over 1 GiB)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With