Sign inSign up

dokeraj/reminder

By dokeraj

Updated 11 months ago

Send reminder messages to discord with cronjob

Image
0

1.1K

dokeraj/reminder repository overview

This is a python script that calls discord webhook on a cronjob schedule.

Rationale

If you don't want to use a discord bot, you can host your own reminder. This is a niche docker image - mostly for recurring reminders - it's not flexible, since you need to stop the container in add new reminders and start it again.

Supported Architectures

  • armhf - Raspberry Pi 3 and 4
  • amd64

The tag latest is multi-arch, so you can use it for any architecture.

Usage

  1. You must create the following file named config.yml and place it in a folder, that will be binded to a volume. Otherwise you cannot use this docker image. In the config - you can add as many list objects in the cron field, as well as in the last_day_of_month field. The last

config.yml

general_settings:
  ## MANDATORY. You Discord webhook API key
  discord_api_key: "<INSERT YOUR DISCORD WEBHOOK API KEY>"

## This is the schedule when you want the script to run and call the Reminder message. You can create as many reminders as you'd like
reminder_schedule:
  ## DELETE IF NOT NEEDED
  cron:
    - message: "<INPUT YOUR REMINDER HERE>"

      ## Use the numbers from 1-12 or *
      month: "<INPUT MONTH HERE>"

      ## available values are numbers from 1 to 31 or *
      day: "<INPUT DAY HERE>"

      ## Use HH:mm format and wrap the time in quatation marks e.g. "14:28"
      time: "<HH:mm>"

      ## available values are MON, TUE, WED, THU, FRI, SAT, SUN or *
      day_of_week: "<INPUT DAY OF WEEK HERE>"


  ## DELETE IF NOT NEEDED
  ## last_day_of_month means that it will run on whichever is the last day of the month (for example July has 31 days, so if you fill this field - the reminder will be run on the 31st on July, and 30th on september)
  last_day_of_month:
    - message: "<INPUT YOUR REMINDER HERE>"

      ## Use HH:mm format and wrap the time in quatation marks e.g. "14:28"
      time: "<HH:mm>"

## DELETE IF NOT NEEDED
## fortnight_schedule means that it will run on every other week on the specified day of the week.
fortnight_schedule:
  message: "<INPUT YOUR REMINDER HERE>"

  ## set whether to run the script on even or odd weeks - the weeks are calculated based on the iso calendar. To see the current week of the year we're in: https://www.epochconverter.com/weeknumbers
  ## example - if we're in week 43, and you set the week_type to be even, then the reminder will be shown in weeks 44, 46, 48 etc..
  ## available values are EVEN or ODD
  week_type: "<EVEN/ODD>"

  ## Use HH:mm format and wrap the time in quatation marks e.g. "14:28"
  time: "<HH:mm>"

  ## available values are MON, TUE, WED, THU, FRI, SAT, SUN or *
  day_of_week: "<INPUT DAY OF WEEK HERE>"

The config.yml can also be found here.

Docker create command

docker create \
 --name=reminder \
-e TZ="Europe/Skopje" \ 
-v /path/to/your/yaml/config/file:/yaml  \
--restart unless-stopped \
dokeraj/reminder:latest
Creation flags explanation
flagFunction
-e TZ=Europe/LondonMandatory. Set it to your timezone. Note: If not set properly, the scheduled reminder will not be ran at the specified time!
-v /path/to/your/yaml/config/file:/yamlMandatory. This bind should point to where you have placed your config.yml file, so reminder can read it on startup.

Github project

Source code can be found here: Reminder

Tag summary

Content type

Image

Digest

sha256:78b7ecac8

Size

23.8 MB

Last updated

11 months ago

docker pull dokeraj/reminder