I have a crontab running every hour. The user running it has environment variabless in the .bash_profile that work when the user runs the job from the terminal,
.bash_profile
For me I had to specify path in my NodeJS file.
// did not work!!!!! require('dotenv').config()
instead
// DID WORK!! require('dotenv').config({ path: '/full/custom/path/to/your/.env' })