I’ve now been using Manjaro Linux since the start of 2020
So far so good, I’m getting used to the way it works. Linux quirks that can be a real pain to learn or get used to. Coming from Windows after using it for over 30 years, for about 90% of the time I’m pleased with it.
Unlike Windows it’s harder to use, to modify or create files, folders in certain places etc can be a real pain, because of Linux’s security, I suppose it’s a good thing, but wrapping you head around how to modify a dopey file or to add a line can be more than just a pain in the ass.
In a these posts, I’m trying to write down things that I found really hard to do or learn, or very time consuming to do, hoping that maybe of some use to someone.
This tip is how to get Cron to send an email when the job has been completed (in my case a backup evry hour from 9h – 22h, sadly as like many of Linux’s programs this is far from easy.
Being in Manjaro, I first has to install ssmtp, this the easy part…
Once installed you will find a folder at /etc/ssmtp/
Inside will be two files, ssmtp.conf & revaliases. As usual these have only root permissions and so you need to modify them as root and not as user.
In the conf file once open you just need to paste the following under the line # The full hostname (for info when a line has a # in front of it, this means that it’s a commented line not a command line)
I’ll try and explain what needs to be modified in the above lines
user-manjaro (open a terminal, type hostname
email@example.com replace with your gmail address
AuthPass=123456 need if you use gmail with 2FA, you have to create a special password under gmail security’s settings to let ssmtp / Linux send yurself mails (https://support.google.com/accounts/answer/185833?hl=en)
So once these details have been sent you can modify the second file Revaliases
Once this has been done, you can modify your cron file and instead of
Now when your cron job runs, you will receive a mail, sadly the subject of the cron command line , it’s long and a mess : but it’s better than nothing
Email subject line : Cron <root@usermanjaro> root rsync -avhW /home/trevor/Documents/* /run/media/trevor/BackUp_1/Copy_trevor_home_documents