Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Should I Turn My Lightweight API Scheduler into an Open-Source Project?

jberndt

New Coder
Hey everyone,

I recently came across a scenario where I needed a lightweight solution to schedule delayed and recurring callbacks for my API. Specifically, I wanted my API to interact with a service that could trigger a designated endpoint, for example, after 2 hours. Additionally, this service should also be capable of making daily calls to a specific endpoint. I'd also like to run this service in a Docker container as part of my application setup.

In my search for a solution, I explored several options:
  • RabbitMQ (no support for recurring tasks)
  • Celery and Redis Queue (too heavy for my needs)
  • AWS EventBridge and Step Functions (not self-hostable)
  • Temporal and Apache Airflow (both heavy and not self-hostable)
Eventually, I stumbled upon APScheduler. I ended up building a simple Flask app around it and bundled everything into a Docker container. It’s been working pretty well so far.

I'm surprised there isn't a go-to solution for such a simple use case (or maybe I just haven't found it yet). Are these kinds of requirements unusual? If not, do you think it would be worthwhile to refine what I’ve put together and turn it into an open-source project?
 
The reason you probably haven't found a more popular "go-to" solution is that many developers have different needs and different use cases for scheduling. Some want heavy orchestration, while others just need simple job scheduling, like what you do. Consequently, many tend to roll their own solutions based on existing lightweight libraries (as you have done).

It is difficult to comment on your actual question.

Tens or even hundreds of hours working with the code editor will surely feel in the mind. And we certainly can't rule out the possibility that you could make money with that code. I can't say, I don't need that kind of code myself.

And even if you give the code away, it doesn't necessarily gather interested developers around it to develop it further.

I don't really code any big programs anymore, but my own thinking has always been that if I can't find any reason not to share the code, then I will share it openly if the code is really of such high quality that I dare to share it.

However, I am quite an open person when it comes to coding. If someone somehow benefits from the code I write, I don't suffer from "code envy".
 
Thank your for your reply.

Your thinking makes sense because I dont see any reason not to share it either. So I'll probably just do so and gather more feedback with a more specific codebase to work with.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom