The officially official Devuan Forum!

You are not logged in.

#51 Today 00:07:44

MiyoLinux
Member
Registered: 2016-12-05
Posts: 811  

Re: Software update notifications in XFCE

MiyoLinux wrote:
franko wrote:

Are you sure? If I understand that syntax right, that means every 3:45 h since a computer is started. I believe 3 would mean at 3 am, and */3 means every 3 hours since you start a computer... Am I wrong about it? At least, that's what it seems to work like here on my machine...

I'm gonna have a brain-jerkdown thinking about this. LOL! tongue

According to my cron log, mine is working as I described. For instance, if I turn my computer on at 8:30 am (and using the 45 */3 * * * example), the cron job will do its first run at 9:45 am...despite the computer has only been on an hour and 15 minutes. However, the update-notifier.py script won't run until the computer has been on for 4 hours.

That's how mine is working...never know though...I might've jinxed it. LOLOLOL! tongue

Edited to add...

It's almost time for the cron job to run...I'll reboot and double-check. I'll report back.

Okay...it's working as I described. I'm doing the final testing of the i3 release today, so this cron log is from it.

RED = When the computer is turned on (notice I turned it on after the 6:45 am mark, but it still ran the first cron at 9:45. The second time in RED is when I rebooted to make sure that I knew what I was talking about. LOL! big_smile  Computer on at 6:20 pm, and the cron ran at 6:45 pm.

YELLOW = the cron job for the updater.

Feb 15 06:50:25 localhost cron[1386]: (CRON) INFO (pidfile fd = 3)
Feb 15 06:50:25 localhost cron[1387]: (CRON) STARTUP (fork ok)
Feb 15 06:50:25 localhost cron[1387]: (CRON) INFO (Running @reboot jobs)

Feb 15 06:55:01 localhost CRON[2835]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 07:05:01 localhost CRON[3939]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 07:15:01 localhost CRON[5020]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 07:17:01 localhost CRON[5231]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 07:25:01 localhost CRON[6083]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 07:30:01 localhost CRON[6638]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
Feb 15 07:35:01 localhost CRON[7189]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 07:45:01 localhost CRON[8233]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 07:55:01 localhost CRON[9322]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 08:05:01 localhost CRON[10344]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 08:15:01 localhost CRON[11372]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 08:17:01 localhost CRON[11583]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 08:25:01 localhost CRON[12388]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 08:35:01 localhost CRON[13416]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 08:45:01 localhost CRON[14420]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 08:55:01 localhost CRON[15417]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 09:05:01 localhost CRON[16414]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 09:15:01 localhost CRON[17415]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 09:17:01 localhost CRON[17610]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 09:25:01 localhost CRON[18398]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 09:35:01 localhost CRON[19394]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 09:45:01 localhost CRON[20393]: (root) CMD (/usr/bin/apt-get update)
Feb 15 09:45:01 localhost CRON[20394]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 09:45:17 localhost CRON[20390]: (CRON) info (No MTA installed, discarding output)
Feb 15 09:55:01 localhost CRON[21645]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 10:05:01 localhost CRON[22635]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 10:15:01 localhost CRON[23611]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 10:17:01 localhost CRON[23814]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 10:25:01 localhost CRON[24602]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 10:35:01 localhost CRON[25594]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 10:45:01 localhost CRON[26594]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 10:55:01 localhost CRON[27587]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 11:05:01 localhost CRON[28572]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 11:15:01 localhost CRON[29552]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 11:17:01 localhost CRON[29748]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 11:25:01 localhost CRON[30540]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 11:35:01 localhost CRON[31520]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 11:45:01 localhost CRON[32516]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 11:55:01 localhost CRON[1038]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 12:05:01 localhost CRON[2166]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 12:15:01 localhost CRON[3162]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 12:17:01 localhost CRON[3357]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 12:25:01 localhost CRON[4137]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 12:35:01 localhost CRON[5126]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 12:45:01 localhost CRON[6107]: (root) CMD (/usr/bin/apt-get update)
Feb 15 12:45:01 localhost CRON[6108]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 12:45:07 localhost CRON[6106]: (CRON) info (No MTA installed, discarding output)
Feb 15 12:55:01 localhost CRON[7362]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 13:05:01 localhost CRON[8347]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 13:15:01 localhost CRON[9339]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 13:17:01 localhost CRON[9539]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 13:25:01 localhost CRON[10412]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 13:35:01 localhost CRON[11401]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 13:45:01 localhost CRON[12389]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 13:55:01 localhost CRON[13369]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 14:05:01 localhost CRON[14358]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 14:15:01 localhost CRON[15338]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 14:17:01 localhost CRON[15542]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 14:25:01 localhost CRON[16330]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 14:35:01 localhost CRON[17314]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 14:45:01 localhost CRON[18298]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 14:55:01 localhost CRON[19289]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 15:05:01 localhost CRON[20269]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 15:15:01 localhost CRON[21270]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 15:17:01 localhost CRON[21469]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 15:25:01 localhost CRON[22250]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 15:35:01 localhost CRON[23242]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 15:45:01 localhost CRON[24233]: (root) CMD (/usr/bin/apt-get update)
Feb 15 15:45:01 localhost CRON[24234]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 15:45:06 localhost CRON[24232]: (CRON) info (No MTA installed, discarding output)
Feb 15 15:55:01 localhost CRON[25471]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 16:05:01 localhost CRON[26471]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 16:15:01 localhost CRON[27455]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 16:17:01 localhost CRON[27654]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 16:25:01 localhost CRON[28443]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 16:35:01 localhost CRON[29423]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 16:45:01 localhost CRON[30413]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 16:55:01 localhost CRON[31389]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 17:05:01 localhost CRON[32365]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 17:15:01 localhost CRON[888]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 17:17:01 localhost CRON[1091]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 17:25:01 localhost CRON[2017]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 17:35:01 localhost CRON[3006]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 17:45:01 localhost CRON[3984]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 17:55:01 localhost CRON[4974]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 18:05:01 localhost CRON[5958]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 18:15:01 localhost CRON[6946]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 18:17:01 localhost CRON[7146]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Feb 15 18:20:45 localhost cron[1397]: (CRON) INFO (pidfile fd = 3)
Feb 15 18:20:45 localhost cron[1398]: (CRON) STARTUP (fork ok)
Feb 15 18:20:45 localhost cron[1398]: (CRON) INFO (Running @reboot jobs)

Feb 15 18:25:01 localhost CRON[2646]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 18:35:01 localhost CRON[3703]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 18:45:01 localhost CRON[4732]: (root) CMD (/usr/bin/apt-get update)
Feb 15 18:45:01 localhost CRON[4733]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Feb 15 18:45:06 localhost CRON[4731]: (CRON) info (No MTA installed, discarding output)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#52 Today 02:06:14

franko
Member
Registered: 2019-02-04
Posts: 32  

Re: Software update notifications in XFCE

I've been reading this guide, that brought me to my undestanding: https://code.tutsplus.com/tutorials/sch … --net-8800

Where do you get that log? I've been just observing when do I get the aforementioned mail from the cron job...

My cron job for the update is set like this: 0 */3 * * * root /usr/bin/apt-get update

According to what you say and what seems from that log, it would mean it would be done at 3 am, 6 am etc... But I received that mail some time after midnight and before 3 am -- of that I'm sure. So I believe it counts 3 hours since the computer boot up, and than again, and again... I will give more precise attention to it tomorrow.

It IS confusing...

Last edited by franko (Today 02:09:27)

Online

#53 Today 03:48:23

MiyoLinux
Member
Registered: 2016-12-05
Posts: 811  

Re: Software update notifications in XFCE

franko wrote:

I've been reading this guide, that brought me to my undestanding: https://code.tutsplus.com/tutorials/sch … --net-8800

Where do you get that log? I've been just observing when do I get the aforementioned mail from the cron job...

My cron job for the update is set like this: 0 */3 * * * root /usr/bin/apt-get update

According to what you say and what seems from that log, it would mean it would be done at 3 am, 6 am etc... But I received that mail some time after midnight and before 3 am -- of that I'm sure. So I believe it counts 3 hours since the computer boot up, and than again, and again... I will give more precise attention to it tomorrow.

It IS confusing...

I don't know...perhaps the mail only goes out once a day?

Regarding the location of the log...I'm on my phone, so I'm doing this from memory...

I don't remember the actual name of the cron log file...but it's located in /var/log/ and it has "cron" in the name.

EDITED: Of all things, it's called cron.log   LOLOLOL! tongue

If it's not already there, check to see if cron is commented out in the rsyslog.conf file...found in /etc/rsyslog.conf.

I think you may have to reboot after uncommenting cron in the rsyslog.conf file for it to show up in /var/log.

Last edited by MiyoLinux (Today 12:33:49)


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#54 Today 12:43:34

xinomilo
Member
Registered: 2017-07-02
Posts: 42  

Re: Software update notifications in XFCE

cron.log is not always available. not by default IIRC. depends on log daemon/settings.
as root :
# grep CRON  /var/log/syslog

Feb 15 18:45:06 localhost CRON[4731]: (CRON) info (No MTA installed, discarding output)

this means there is no way to send email. you need an MTA installed. (i use ssmtp on laptop for that.)

Offline

#55 Today 17:19:36

franko
Member
Registered: 2019-02-04
Posts: 32  

Re: Software update notifications in XFCE

MiyoLinux wrote:

I don't know...perhaps the mail only goes out once a day?

Regarding the location of the log...I'm on my phone, so I'm doing this from memory...

I don't remember the actual name of the cron log file...but it's located in /var/log/ and it has "cron" in the name.

EDITED: Of all things, it's called cron.log   LOLOLOL! tongue

If it's not already there, check to see if cron is commented out in the rsyslog.conf file...found in /etc/rsyslog.conf.

I think you may have to reboot after uncommenting cron in the rsyslog.conf file for it to show up in /var/log.

No, the mail is delivered every time a root cron job is done... But you ARE right in the end. Last night I was sleepy and I deleted the mail before I checked it, and then commented basing myself on loose observation. Today I was brighter, and I checked the mail and when the various messages were sent: 15:00 and 18:00 h, for now.... and my laptop was on since about 13:00, So it's obvious I was in error. :-D Sorry for raising confusion. XD But I learned something. :-)

Online

#56 Today 17:29:23

MiyoLinux
Member
Registered: 2016-12-05
Posts: 811  

Re: Software update notifications in XFCE

franko wrote:

No, the mail is delivered every time a root cron job is done...

Sorry for raising confusion. XD But I learned something. :-)

I also learned something. I have no mail. So, what you pointed out is good for me to know.

I didn't see it as confusion. smile


I have been Devuanated, and my practice in the art of Devuanism shall continue until my Devuanization is complete. Until then, I will strive to continue in my understanding of Devuanchology, Devuanprocity, and Devuanivity.

Veni, vidi, vici vdevuaned. I came, I saw, I Devuaned. wink

Offline

#57 Today 17:47:39

chris2be8
Member
Registered: 2018-08-11
Posts: 40  

Re: Software update notifications in XFCE

Seeing the cron log reminded me that cron tries to email output from cron jobs to the user it runs as. So if you don't want the emails just redirect the output to /dev/null (much as the output from the debian-sa1 job is). Or redirect it to a file so you can see it if you want.

Chris

Offline

Board footer