You are not logged in.

#1 2021-06-11 17:01:12

Arciere
Member
Registered: 2020-10-07
Posts: 59

.

.

Last edited by Arciere (2025-04-30 08:37:22)

Offline

#2 2021-06-11 17:48:39

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,335

Re: .

output of

anacron -T

?

also please post outputs of

$ ls -l /etc/cron.*
$ journalctl --since "2 days ago" --utc | grep -i cron

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2021-06-11 18:46:38

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: .

This is an oldie, but goodie; about setting up anacron.


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

#4 2021-06-14 07:31:26

Arciere
Member
Registered: 2020-10-07
Posts: 59

Re: .

.

Last edited by Arciere (2025-04-30 08:37:11)

Offline

#5 2021-06-14 11:48:20

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: .

Arciere wrote:
merlock wrote:

This is an oldie, but goodie; about setting up anacron.

In that link I see many commands, including the creation of specific folders for anacron: does this mean that it is not enough to simply modify the anacrontab config file to activate its functions?

IIRC, you need the user folders if you have *user* jobs you want to schedule/run.

Arciere wrote:

The output of anacron -T returns nothing (not even trying with sudo)

Check the man pages for anacron and anacrontab.

As an aside, have you looked into systemd-timers?  I moved all my cron/anacron related stuff over a few years ago, and have been a happy camper.


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

#6 2021-06-16 12:18:05

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,335

Re: .

Arciere wrote:

The output of anacron -T returns nothing (not even trying with sudo).

If you execute echo $? right after that command, you'll see its exit status and it will be 0 .
On linux exit status 0 means : command was succesfull , no errors or problems found .


Lines like

giu 14 05:35:01 t495-fede anacron[2777]: Job `update' terminated (exit status: 127) (produced output)
giu 14 05:35:01 t495-fede anacron[2777]: Can't find sendmail at /usr/sbin/sendmail, not mailing output

do suggest something went wrong .

man anacrontab wrote:

If MAILTO is defined (and non-empty), mail is sent to the specified address, otherwise, system user is used.

Make sure you have MAILTO="" in /etc/anacrontab, then ensure anacron will use the system user for output .
restart cronie / anacran to verify anacron / cronie will no longer try to use sendmail .

Post your /etc/.anacrontab .



P.S.

merlock wrote:

As an aside, have you looked into systemd-timers?  I moved all my cron/anacron related stuff over a few years ago, and have been a happy camper.

Exactly the reverse from my experience.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2021-06-16 14:10:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,445

Re: .

I modified /etc/anacrontab by adding the following line:
1    10    anacronTest    /bin/bash /home/$USER/scripts/anacronTest.sh

*literally* "$USER"?

Online

#8 2021-06-19 06:48:29

Arciere
Member
Registered: 2020-10-07
Posts: 59

Re: .

.

Last edited by Arciere (2025-04-30 08:36:56)

Offline

#9 2021-06-19 11:03:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,445

Re: .

I think the problem was having written "$USER" instead of my username

I'm pretty sure because anacron runs as root.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

Board footer

Powered by FluxBB