I am building a smart-home web-application from scratch using flask as the backend. I want to be able to create a new task in the frontend (e.g. turn off light at 11pm), which then gets passed to the backend using a request as following: @app.route("/create-task/") def createTask(): # create a scheduled task based on the users input return "something" I looked at other posts and came across APScheduler as a way of automating tasks with Flask. However, I have struggled to find solutions on how to implement that with this dynamic task creation I had in mind. What would be the best way to do this? Continue reading...