On 9/22/19 6:17 PM, Patrick Dupre wrote:
On my machine, I have crond and anacron running.
I guess that I do not need crond.
I can easily manage crond, but waht about anacron?
systemctl status anacron
Unit anacron.service could not be found
systemctl status anacrond
Unit anacrond.service could not be found
while
systemctl status crond
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor
preset: enabled)
Active: active (running) since Sun 2019-09-22 09:09:21 CEST; 3h 5min ago
Main PID: 1429 (crond)
Tasks: 7 (limit: 4915)
Memory: 4.3G
CGroup: /system.slice/crond.service
├─ 1429 /usr/sbin/crond -n
├─ 8113 /usr/sbin/anacron -s
├─10084 /usr/bin/bash /bin/run-parts /etc/cron.weekly
├─10088 /bin/sh /etc/cron.weekly/backup.cron
It seems that anacron is a service of crond.
Is the only option to remove crontabs?
If you were to look at the file /lib/systemd/system/crond.service you'd see
that it only starts crond.
Then, you would look at the various system cron directories and find that
/etc/cron.hourly contains 0anacron.
Then you'd check /etc/anacrontab to see that it is responsible for running
"run-parts" when the criteria is met.
anacron should exit when those jobs are complete.
If those jobs aren't completing you have another issue.
You should see entries along these lines in the journal.
Sep 22 03:01:01 meimei.greshko.com run-parts[22266]: (/etc/cron.hourly)
starting 0anacron
Sep 22 03:01:01 meimei.greshko.com anacron[22272]: Anacron started on 2019-09-22
Sep 22 03:01:01 meimei.greshko.com anacron[22272]: Will run job `cron.daily' in
37 min.
Sep 22 03:01:01 meimei.greshko.com anacron[22272]: Will run job `cron.weekly'
in 57 min.
Sep 22 03:01:01 meimei.greshko.com anacron[22272]: Jobs will be executed
sequentially
Sep 22 03:01:01 meimei.greshko.com run-parts[22274]: (/etc/cron.hourly)
finished 0anacron
Sep 22 03:38:01 meimei.greshko.com anacron[22272]: Job `cron.daily' started
Sep 22 03:38:01 meimei.greshko.com anacron[22272]: Job `cron.daily' terminated
Sep 22 03:58:01 meimei.greshko.com anacron[22272]: Job `cron.weekly' started
Sep 22 03:58:08 meimei.greshko.com anacron[22272]: Job `cron.weekly' terminated
Sep 22 03:58:08 meimei.greshko.com anacron[22272]: Normal exit (2 jobs run)
Sep 22 04:01:01 meimei.greshko.com run-parts[23286]: (/etc/cron.hourly)
starting 0anacron
Sep 22 04:01:01 meimei.greshko.com run-parts[23292]: (/etc/cron.hourly)
finished 0anacron
Notice that the anacron introduces a "random" delay to start run-parts. So, you may see
anacron "running" for a while until all the processes it is responsible for starting have
finished. So, looking at the above I would have seen anacron running on my system from 03:01:01
until 03:58:08
--
If simple questions can be answered with a simple google query then why are
there so many of them?
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org