[mythtv-users] anacron

Daryl McDonald darylangela at gmail.com
Sun May 5 20:31:23 UTC 2019


On Sat, May 4, 2019 at 12:28 AM Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:

> On Fri, 3 May 2019 18:48:33 -0400, you wrote:
>
> >daryl at trieli:~$ cat /var/log/syslog | grep anacron
> >May  2 19:35:52 trieli anacron[6305]: Job `cron.daily' terminated
> >May  2 19:35:52 trieli anacron[6305]: Normal exit (1 job run)
> >May  3 17:48:34 trieli systemd[1]: Started Trigger anacron at 19:30.
> >
> >Above proves the run time for anacron has been amended, but why only one
> >job run? I've got lots of jobs in there:
> >daryl at trieli:~$ ls -al /etc/cron.daily
> >total 84
> >drwxr-xr-x   2 root root  4096 Apr 25 22:45 .
> >drwxr-xr-x 132 root root 12288 Apr 29 11:55 ..
> >-rwxr-xr-x   1 root root   311 May 29  2017 0anacron
> >-rwxr-xr-x   1 root root   376 Nov 20  2017 apport
> >-rwxr-xr-x   1 root root  1478 Apr 20  2018 apt-compat
> >-rwxr-xr-x   1 root root   355 Dec 29  2017 bsdmainutils
> >-rwxr-xr-x   1 root root   384 Dec 12  2012 cracklib-runtime
> >-rwxr-xr-x   1 root root  1176 Nov  2  2017 dpkg
> >-rwxr-xr-x   1 root root   372 Aug 21  2017 logrotate
> >-rwxr-xr-x   1 root root  1065 Apr  7  2018 man-db
> >-rwxr-xr-x   1 root root   538 Mar  1  2018 mlocate
> >-rwxr-xr-x   1 root root   449 Apr 14  2018 mythtv-database
> >-rwxr-xr-x   1 root root  1387 Dec 13  2017 ntp
> >-rwxr-xr-x   1 root root  1286 Jan 12 09:56 optimize_mythdb.pl
> >-rwxr-xr-x   1 root root   249 Jan 25  2018 passwd
> >-rw-r--r--   1 root root   102 Nov 16  2017 .placeholder
> >-rwxr-xr-x   1 root root  3477 Feb 20  2018 popularity-contest
> >-rwxr-xr-x   1 root root   246 Mar 21  2018 ubuntu-advantage-tools
> >-rwxr-xr-x   1 root root   214 Jul 12  2013 update-notifier-common
> >
> >Is this as it should be?
>
> Yes.
>
> Anacron runs things from /etc/anacrontab.  This is what is in
> anacrontab:
>
> root at mypvr:/etc# cat /etc/anacrontab
> # /etc/anacrontab: configuration file for anacron
>
> # See anacron(8) and anacrontab(5) for details.
>
> SHELL=/bin/sh
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> HOME=/root
> LOGNAME=root
>
> # These replace cron's entries
> 1       5       cron.daily      run-parts --report /etc/cron.daily
> 7       10      cron.weekly     run-parts --report /etc/cron.weekly
> @monthly        15      cron.monthly    run-parts --report
> /etc/cron.monthly
>
> So the job that anacron runs is named "cron.daily".  The cron.daily
> job runs the command "run-parts --report /etc/cron.daily".  So it runs
> the "run-parts" program on the contents of the "/etc/cron.daily"
> directory.  If you do a "man run-parts" command, you will see that
> run-parts will read all the files in /etc/cron.daily and run them in
> the order it reads them.  It will do it sequentially - one job will
> not start until the previous one has finished.  The "--report" option
> makes run-parts output the name of any job it runs that produces
> output on stdout or stderr.  Anacron collects all the output from
> run-parts and emails it to the user that anacron is running as (root
> in this case).  If you do not have your system set up to do email,
> that email will be dropped.  So you either need to install email
> software on your system, or put a "MAILTO=myemail at myaddress" line at
> the top of the /etc/anacrontab file to direct the email to one of your
> existing accounts.


I've just implemented this part of your suggestion, thanks Stephan.
so the email will come after 19:30 when anacron runs? everyday?

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190505/62dc7784/attachment.html>


More information about the mythtv-users mailing list