How can I sure cron executed properly?

Issues related to applications and software problems and general support
hack3rcon
Posts: 734
Joined: 2014/11/24 11:04:37

Re: How can I sure cron executed properly?

Post by hack3rcon » 2020/12/30 20:00:40

Thank you.
My server doesn't have "mail" program:

Code: Select all

# /usr/bin/mail
mailq          mailq.postfix  
And:

Code: Select all

# dnf list mailx
Last metadata expiration check: 0:36:46 ago on Wed 30 Dec 2020 10:51:25 PM +0330.
Available Packages
mailx.x86_64                         12.5-29.el8                          baseos
I tried to install it:

Code: Select all

# dnf install mailx
Last metadata expiration check: 0:37:53 ago on Wed 30 Dec 2020 10:51:25 PM +0330.
Dependencies resolved.
==========================================================================================================
 Package               Architecture           Version                        Repository              Size
==========================================================================================================
Installing:
 mailx                 x86_64                 12.5-29.el8                    baseos                 257 k

Transaction Summary
==========================================================================================================
Install  1 Package

Total download size: 257 k
Installed size: 491 k
Is this ok [y/N]: y
Downloading Packages:
mailx-12.5-29.el8.x86_64.rpm                                              264 kB/s | 257 kB     00:00    
----------------------------------------------------------------------------------------------------------
Total                                                                     181 kB/s | 257 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                  1/1 
  Installing       : mailx-12.5-29.el8.x86_64                                                         1/1 
  Running scriptlet: mailx-12.5-29.el8.x86_64                                                         1/1 
  Verifying        : mailx-12.5-29.el8.x86_64                                                         1/1 
Installed products updated.

Installed:
  mailx-12.5-29.el8.x86_64                                                                                

Complete!
Then:

Code: Select all

# mail
No mail for root

lightman47
Posts: 1250
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: How can I sure cron executed properly?

Post by lightman47 » 2020/12/30 20:18:58

How about (as root) you do this:

Code: Select all

cat /var/mail/root | less
Remember - importing/building packages will likely "byte you in the butt" come update time, long after you'd forgotten you did that! Use repos whenever possible.

hack3rcon
Posts: 734
Joined: 2014/11/24 11:04:37

Re: How can I sure cron executed properly?

Post by hack3rcon » 2020/12/31 11:03:18

It just show me a blank screen with "END" at the end of it.

Code: Select all

# cat /var/mail/root | less
cat: /var/mail/root: No such file or directory

hack3rcon
Posts: 734
Joined: 2014/11/24 11:04:37

Re: How can I sure cron executed properly?

Post by hack3rcon » 2021/01/11 11:53:46

No idea?

User avatar
TrevorH
Forum Moderator
Posts: 30333
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How can I sure cron executed properly?

Post by TrevorH » 2021/01/11 18:22:44

It should be /var/spool/mail/root
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

hack3rcon
Posts: 734
Joined: 2014/11/24 11:04:37

Re: How can I sure cron executed properly?

Post by hack3rcon » 2021/01/14 16:42:16

TrevorH wrote:
2021/01/11 18:22:44
It should be /var/spool/mail/root

Code: Select all

# cd /var/spool/mail/root
bash: cd: /var/spool/mail/root: No such file or directory

hack3rcon
Posts: 734
Joined: 2014/11/24 11:04:37

Re: How can I sure cron executed properly?

Post by hack3rcon » 2021/01/18 11:35:36

No way to run a cron job manually?

Post Reply

Return to “CentOS 8 - General Support”