I’m getting this:
Cron won’t list current jobs, ie sudo cron -l
fails. It returns:
can't lock /var/run/crond.pid, otherpid may be 468110: Resource temporarily unavailable
I’ve tried the following steps:
sudo kill -9 $(cat /var/run/crond.pid)
$ ps aux | grep $(cat /var/run/crond.pid)
root 1322 0.0 0.0 9412 3096 ? Ss Feb15 0:00 /usr/sbin/cron -f
$ sudo service cron stop
$ sudo service cron start
$ sudo cron -l
cron: can't lock /var/run/crond.pid, otherpid may be 468110: Resource temporarily unavailable
The status of cron:
sudo service cron status
● cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-02-16 18:20:06 PST; 1min 40s ago
Docs: man:cron(8)
Main PID: 467956 (cron)
Tasks: 1 (limit: 38312)
Memory: 484.0K
CGroup: /system.slice/cron.service
└─467956 /usr/sbin/cron -f
The task gets locked immediately with a new PID, so something is grabbing it right away.
I also haven’t actually added any cron tasks myself, however I do have clamav installed and it has a freshclam task associated with it.
Any ideas?