Page 2 of 2

Re: How can I sure cron executed properly?

Posted: 2020/12/30 20:00:40
by hack3rcon
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

Re: How can I sure cron executed properly?

Posted: 2020/12/30 20:18:58
by lightman47
How about (as root) you do this:

Code: Select all

cat /var/mail/root | less

Re: How can I sure cron executed properly?

Posted: 2020/12/31 11:03:18
by hack3rcon
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

Re: How can I sure cron executed properly?

Posted: 2021/01/11 11:53:46
by hack3rcon
No idea?

Re: How can I sure cron executed properly?

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

Re: How can I sure cron executed properly?

Posted: 2021/01/14 16:42:16
by hack3rcon
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

Re: How can I sure cron executed properly?

Posted: 2021/01/18 11:35:36
by hack3rcon
No way to run a cron job manually?