Reputation: 3
I currently have two cron jobs in a server. One for a shell scrpit and another for a mysqldump.
Example:
43 16 * * * /var/backups_scripts/backups
46 16 * * * /usr/bin/mysqldump --login-path=bds-server --single-transaction database_name | /bin/gzip > /var/backups/bd_backup_$(/bin/date +\%d\%m\%Y_\%H\%M\%S).sql.gz
I have set up Nullmailer MTA. I can perfectly send an e-mail from terminal:
echo "Subject: sendmail test" | sendmail -v my_email
And I put that MAILTO line inside the cron tab (crontab -e
).
Well, it's very strange that I receive outputs by email only when the shell script runs.
Regarding the mysqldump, no email is sent, and I was not able to see any reference to it on logs.
Any help would be very appreciated.
Tried other MTA, as msmtp, for example, without succes (the same happens).
P.S.: both tasks are being executed as I can see in their destinations.
P.S. 2: I really don't understood why the question was closed, sorry. My current job for mysqldump already have the scape charecter () right before the "%" symbol, as the suggested article mentions.
Upvotes: 0
Views: 72