Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.
/ fdj-notify Public archive

Tiny, Heroku-ready script to get notified for the next Euromillions jackpot based on your preferences

License

Notifications You must be signed in to change notification settings

pil0u/fdj-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

As of 2024-04-30, this repo is archived

fdj-notify

Auto-send yourself an email when a EuroMillions draw matches your criteria.

Requirements

  • Ruby 3.2.2
  • Bundler

Configuration

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 or mardi,vendredi (default: mardi,vendredi)
  • MAILER_USER_NAME, your Gmail email address
  • MAILER_PASSWORD, your generated app password (select "Other" and choose any name you want)

⚠️ You should never share your MAILER_PASSWORD, as it grants access to your entire Google Account.

Usage

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.

Deploy on Heroku

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

Setup the Heroku Scheduler to trigger the script once a day

heroku addons:create scheduler:standard
heroku addons:open scheduler

This last command opens a web page, the Scheduler dashboard.

  1. Click on Create a job
  2. Choose an interval (I recommend Every day at 04:00AM UTC)
  3. Add the command ruby run.rb

About

Tiny, Heroku-ready script to get notified for the next Euromillions jackpot based on your preferences

Topics

Resources

License

Stars

Watchers

Forks

Languages