The common approaches here would be to create a Django management command that performs the checks, you can then use a cronjob on your server to schedule this every minute.
Alternatively, you can use an asynchronous worker, which can also be used to schedule repetitive tasks frequently. The most commonly used solution is Celery but it does have a bit of a learning curve (which tends to manifest itself in reliability) that some other solutions such as Dramatiq seem to be trying to improve upon. Celery is probably the easiest to find instructional information for though.
I am developing a virtual stock market application on django and came upon the following problem. In any stock market application, there is an option of limit buy, stop loss and target sell. This essentially means to buy a share if it ever touches a price which is lower than the current price, to sell a share if it touches a very low price and to sell a share if it touches a high price respectively. For this, the server needs to constantly monitor the live data coming in from the API of a particular stock and perform the action if it happens. However, during this time no one may be making any requests on the site so how do I get django to monitor the prices of the stocks every 5 seconds or so to check if the order needs to be executed or not?
Is there a way to run django constantly on the server to update a database based on live data