Page 1 of 1

Centos 8 crond no pid file

Posted: 2021/01/05 19:50:43
by Lionheart82
Hello all, wish you a happy new year!

I am in a new centos8 minimal server setup as web server.
My issue is that for some reason i see no crond.pid file in /var/run for crond service.

the service is running of course and i see no errors in messages or cron log.

/bin/systemctl status crond.service
crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running)

even tried to add:
CRONDARGS="-x ext,sch,proc,pars,load,misc,test,bit"
in: /etc/sysconfig/crond
but still no error in the logs.

I can confirm that cron is running ok and all crons are also running so everyting is ok... but i would like to add crond to be monitored by "monit"
like: check process crond with pidfile /var/run/crond.pid ...

Any ideas?

Br,
S.Alexandros

Re: Centos 8 crond no pid file

Posted: 2021/01/05 20:54:48
by TrevorH
You don't need monit, systemd already monitors the process and restarts it if it dies.

Re: Centos 8 crond no pid file

Posted: 2021/01/06 16:40:09
by Lionheart82
Thank you for the info, nevertheless it is good to have a monitoring system to be sure...
I solved monit by adding matching crond instead of pid...
So the only thing that remains is the mystery to me of why pid is not created :S i remember in centos 7 it was there.

Thank you for your time.