Cross-posted from “How could I allow users to schedule sending emails at a specific interval?” by @lena@gregtech.eu in !learn_programming@programming.dev


Basically, I’m trying to figure out how I could allow a user to send a schedule in the cron syntax to some API, store it into the database and then send an email to them at that interval. The code is at gragorther/epigo. I’d use go-mail to send the mails.

I found stuff like River or Asynq to schedule tasks, but that is quite complex and I have absolutely no idea what the best way to implement it would be, so help with that is appreciated <3

  • okwhateverdude@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    26 days ago

    I’d carefully consider using email for this. If you’re hosting the service, you might need to use one of the bigger email providers that already have reputation (unless you already have good IPs with good rep). Otherwise, you risk the emails sitting in spam and people’s switches being flipped. If it is self-hosted, you’ll probably need to explain the risks to users.

    Given today’s world of pocket computers, you might consider using push notifications of some kind. Or have a companion client that pokes an API and there is some kind of challenge/response.

    • Lena@gregtech.euOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      26 days ago

      Yeah, I’ll use one of the major email providers, I am aware of the risks of self-hosting email. And yes, I will implement some kind of push notification system, either through the browser or via a mobile app.