This is pretty great
@ThePracticalDev @heroku That's nothing, I once wrote an email script to send 100,000 emails out. It sent one email to the first email, two to the second, three to the third, four to the fourth... I managed to turn the server off at about 1,000...
22:56 PM - 12 Jan 2018
Had a similar one. I had just rewritten a bunch of cron jobs that send time sensitive emails.
There was one cron job that was supposed to run every minute and check the status of a bunch of records that where created 20 minutes before.
When I was testing this little script I changed the time span where the record needed to be created from 1 minute to something like three days and I forgot to change it back before deploying.
When we deployed the change everything went fine because the script wasn't supposed to run till the following morning at around 9am.
Well the morning after I got to the office and everybody was going around crazy because some customers had already received ~30 mails each. I ran to my computer and started killing the container that was sending the emails before going through the source code and finding where the problem was.
I sent around 10k emails in 10 minutes.
Never have I ever wrote a cron job without a unit test after that.
We’re a place for programmers to stay up-to-date, learn new skills, and share ideas.
We’ll never post without your permission.