This is a personal project which I made with Node, Express and Mongo.
I’ve been trying for a few days now to make my web app send an email at certain times (2am and every 4 hours onwards) throughout the day. The emails are retrieved through a mongo database. It works just fine locally but on Heroku it doesn’t work at all.
I don’t know if the heroku logs will help but I’ve posted the last 500 of them here
I have the Cron job in the index.js file and even tried requiring it in app.js.
Here’s the source of index.js
I’ve removed sensitive information such as API KEYS.
Don’t know if this matters but I am using a free Heroku account
Here’s the project itself