0

I'm working on a personal project, where I deploy a model in Flask and connect it to a simple Javascript UI. I just plan to have a single page UI to display daily results, but I'm struggling to figure out how to collect the data daily. There are 2 ways I think of:

  1. using Python Scheduler to extract and save the results at the end of each day, and also schedule time for javascript to fetch and display the results
  2. Schedule time for javascript to trigger Python script to run at the end of each day and display the results

I have not done this before so I don't know which way works or if it's even possible. I there is any suggestion or reference to this task I'd appreciate!

  • 1
    Since your using flask you could use a sqlite database to store all your results. I *think* that it might be possible to simply store all results(with an attached timestamp) and query using the timestamp to retrieve objects by day. If you need to understand how to run a python program using js then check [this](https://stackoverflow.com/questions/13175510/call-python-function-from-javascript-code). To run python programs automatically use windows task scheduler: [Schedule python programs](https://www.google.com/amp/s/www.geeksforgeeks.org/schedule-a-python-script-to-run-daily/amp/). – Alias Cartellano Sep 04 '21 at 16:42

0 Answers0