I would like to build an app, which would call periodic tasks at defined intervals - cron replacement like, but without spawning processes. I'll have a lot of tasks, around 10000 per minute.
- I should be able to add tasks to scheduler dynamically, e.g using RPC
- Tasks should be stored at some central place, like a database.
- It should be scalable, meaning I could run something like worker instances that would process scheduled tasks - if one worker is already under heavy load, another one starts processing scheduled tasks.
I've looked into these options for now:
Celery - can work as a distributed system, but it's not really true scheduler. You can't schedule new jobs dynamically.
APScheduler - tasks can be added dynamically, can store tasks in the database but it's not distributed.
I can probabbly run seperate apscheduler instances, but then each would have different job store (mysql database or table). Also i'd need to determine manually, to which instance job should be submitted. Failover and scalability is also difficult.
Is there any existing python or non-python solution to this problem?