Automated sending of email together with an attached file from sever. For my specific case, it is a log file from web server. Crontab starts the program automatically every day. Crontab works in Linux environment, in Windows it would be taske scheduler.
video about crontab: https://www.youtube.com/watch?v=ljgvo2jM234
the crontab is activated by writing crontab -e in the terminal.
stackoverflow about topic https://stackoverflow.com/questions/42114982/environment-variables-when-script-run-by-cron