Auto-send yourself an email when a EuroMillions draw matches your criteria.
- Ruby 3.2.2
- Bundler
Use a .env
file with these keys:
THRESHOLD
, your minimum jackpot value in millions of € (default:17
)DRAW_DAYS
, value should be one of:mardi
,vendredi
ormardi,vendredi
(default:mardi,vendredi
)MAILER_USER_NAME
, your Gmail email addressMAILER_PASSWORD
, your generated app password (select "Other" and choose any name you want)
⚠️ You should never share yourMAILER_PASSWORD
, as it grants access to your entire Google Account.
bundle install # Install script requirements
ruby run.rb
Ideally, this command should be executed on a schedule (cron) every Tuesday and Friday at 04:00AM UTC.
This section requires heroku-cli
heroku login
heroku create --region=eu fdj-notify
git push heroku main
heroku config:set MAILER_USER_NAME=<your_gmail_address>
heroku config:set MAILER_PASSWORD=<your_gmail_app_password>
heroku config:set THRESHOLD=<your_prefered_minimum> # optional
heroku config:set DRAW_DAYS=<your_prefered_draw_days> # optional
Trigger the script immediately with
heroku run ruby run.rb
heroku addons:create scheduler:standard
heroku addons:open scheduler
This last command opens a web page, the Scheduler dashboard.
- Click on
Create a job
- Choose an interval (I recommend
Every day at 04:00AM UTC
) - Add the command
ruby run.rb