I was sick of forgetting to write my EOD emails to report what I had done that day, so I wrote a quick Node script to do it for me!
- Clone this repo to wherever you put your git projects.
- Run
npm install
from the project root. - Set up your
.env
file in the project root as follows:
SENDER_NAME='Darth Vader'
USER_EMAIL='darth_vader@empire.com'
USER_PASS='d34thst4r4evr'
EMAIL_TO='palpatine@empire.com'
RECIPIENT_NAME='Emperor Palpatine'
-
Currently, the cron job is configured to run at 5:30 M-F. If you need to make changes to that, you can edit the cron format here. What's that? You don't have the completely arbitrary and nonsensical cron format memorized? This handy cron format helper should get you started.
-
Open a new terminal window that you don't mind having open all the time and run this:
/Users/yourname/path/to/the/eod/script &
The &
at the end will have it run in the background.
- Whenever you've done something that you want to report, put it into the
today.txt
file:
echo "Wrote awesome script to automate EOD emails for maximum nerdiness" >> /path/to/eod/dir/today.txt
Note: If it's the first time you're running the echo
command for the day, use the single right angle bracket (>
) to clear the contents of the file and start fresh. Subsequent echoes should be run with >>
to append to the file.