1
vote
2answers
80 views

cron table mailx caused empty content

I'm using centos 7.0/6.5. The content of /etc/cron.hourly/mail.cron #!/bin/sh log=/var/log/mail.cron.log echo "`hostname` `date`" >> $log 2>&1 mailx -s "test mail" me@example.com < ...
0
votes
0answers
29 views

Issues with Cron Mail

I am running a script via cron on a server named backup.server.redacted.org (name made up). The webmaster team's email address webmaster@something.redacted.org, which is the MAILTO= in our crontab. ...
0
votes
1answer
318 views

How to configure in crontab with condition statement for checks

We like to monitor the NAS storage mounted on a Linux box. We only like to be notified via mail when the usage exceeds a certain number, say 80. We have only seen in Linux books where most of them ...
0
votes
1answer
237 views

Crontab doesn't run my script Ubuntu

My script is located in /opt/restart-hlasic.sh restart-hlasic.sh contains: #!/bin/bash SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ SERVER="XXX" ...
1
vote
1answer
77 views

SSH: Dismiss read mail messages from Cron

Whenever I ssh to my server box, I get 'You have mail' along with banner message. Then I type mail, and go through msgs, by hitting enter, until At EOF shows up, and when I do quit or ctrl+d, and ...
0
votes
2answers
102 views

crontab email is not working as expected. First I got the emails at gmail, now I'm not getting them

First I ran a simple test to see if I could get crontab to send me an email. I created the following line: MAILTO = my_email_address@example.com 1 * * * * /bin/echo "foobar" This worked as expected ...
4
votes
1answer
2k views

Is there a aliases file for sSMTP?

I installed sSMTP for sending emails from command line. I want to create some alias for cron jobs: $ sudo vim /etc/aliases # append this line at the end myname: root $ newaliases ...
1
vote
2answers
851 views

Writing a cron job to email myself

How would i write a simple cron job to email myself a message at a certain time? Also is it possible to create a cron job without root access. I'm trying to use my school's server?
0
votes
0answers
487 views

How to set cron HOME environment variable?

I am using esmtp to send email as an output of cron job. The SMTP server and credentials configuration are stored under my $HOME/.esmtprc. However it looks like the $HOME env variable is set to '/', ...
5
votes
2answers
2k views

Only email on cron errors for jobs in cron.daily, cron.hourly, etc

I have several cron jobs that run (in /etc/cron.daily, /etc/cron.hourly, /etc/cron.weekly, etc.) and email root@localhost with the results. I'd like to stop those emails if the jobs are succeeding, ...
0
votes
2answers
1k views

In CPanel, cron job is not being executing and not sending any mail

though many of us has asked many question related to cron jobs, let me ask my one... I want to execute a PHP script periodically. As a cron command I'm using: php -q ...
1
vote
1answer
5k views

Debug cron job - how to get results emailed?

I am trying to debug why my the support ticket system I am setting up is not pulling the POP email from my Google Apps email. I set up a cron job for this, per the instructions of the developer of ...