All Questions
56
questions
1
vote
0
answers
23
views
How to get a daily report of the exit codes of cron jobs
I have a few dozen cron jobs, which run every day, for backups.
I don't want to receive an email for only failed jobs, as I won't know when the email fails.
I don't want to receive an email for every ...
1
vote
1
answer
601
views
Cron job with `echo` sends e-mail instead of printing to terminal
I am new to Unix, learning how to schedule a job. Starting with a simple command like
* * * * * echo 'hello'
on vim. However I do not get the standard output at the start of every minute, instead ...
0
votes
1
answer
223
views
File is not readable when script is called by cron
This really has me scratching my head. I have a PERL script on a RHEL 7 server that creates an xlsx file via MIME::Lite and emails it to several people. If I run the script from the command line it ...
0
votes
1
answer
2k
views
crontab error - SSMTP - 553 5.7.1 Sender address rejected: not owned by user
As root, I installed ssmtp and I configured the /etc/ssmtp/ssmtp.conf as follows:
# Sender email address
[email protected]
# Destination SMTP server and port
mailhub=mail.domain.com:587
# ...
1
vote
2
answers
354
views
What process is generating dead.letter?
I'm using linux:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
I noticed a few weeks ago that there is a file in my home directory: dead....
0
votes
1
answer
344
views
Getting Cron Daemon emails, but no user has crontab
Users on a server of mine are getting mails in /var/spool/mail from Cron Daemon runs but when I check the user's crontab there is nothing there?
From [email protected] Tue Nov 2 15:00:12 ...
0
votes
0
answers
389
views
How to set cron email From field
All my cron emails are sent to spam by gmail, which is not something I want. One of the thing that might put gmail off is that the raw email shows From: root (Cron Daemon).
In the crontab I have both ...
1
vote
1
answer
620
views
Redirect Standard and Error Output to Append a file, and email truncated results
I have a crontab that looks something like this:
0 8 * * * command >> mylog.log 2>&1
This appends both errors and standard output into mylog.log.
In addition to what's above, I want to ...
1
vote
2
answers
2k
views
Do we have to rewrite the MAILTO after each cron command?
As we know that MAILTO is used for receiving any mail related to the Cron job. In my case I have three commands to execute, do I need to add MAILTO three times even if the receiver mail id is the same ...
1
vote
0
answers
137
views
replace MTA with something not email related
What I try to achieve is to send all my server logs, errors, crontab outputs etc. with something like telegram or signal. I am locking for a MTA with can handle a different backend and is still ...
5
votes
1
answer
4k
views
Prevent cronjob's from writing to /var/mail/$USER?
In macOS, cronjobs configured with crontab have the command output and/or error messages (if the cron doesn't succeed) written to the /var/mail/$USER file. Can this be prevented? I've tried:
* * * * *...
2
votes
1
answer
6k
views
CRON (no tty): Delete message with specific "Message-Id"
I have a situation where I need to delete from mailbox (eg. /var/mail/root) messages with specific Message-Id.
Following code works only from console, but I have to do it without user interaction ...
1
vote
1
answer
881
views
Modify subject line of cronjob
I have the following one-line cron command set up which gives me a nice simple message in the body of the email upon backup complete (thanks to @steeldriver).
tar -cpzf /home/user/backups/...
11
votes
2
answers
2k
views
Why does cron require MTA for logging?
Why does cron require MTA for logging? Is there any particular advantage to this? Why can't it create a log file like most other utilities?
0
votes
1
answer
2k
views
Why cron doesn't stop sending emails even redirecting to /dev/null
I have some cron tasks, and some of them doesn't stop sending me emails.
An example task are:
*/2 * * * * php app/console mautic:email:fetch > /dev/null 2>&1
(All ...