How to implement processing of user's payment?

There is a telegram bot odnovremennoe connection to 300-500 users.

Algorithm:
Accepts payments, via day returns 5% of the balance. The main thing - that the bot will not be given to earnings earlier than we will be able to invest and to receive revenues, i.e. no earlier than day.

I decided to implement it:
  • The bot accepts payment from the user through the enter-kassa and writes it as a request for the Deposit.
  • Twice a day the bot calculates a replenishment requisition to the balance, but only if, after their creation took at least 24 hours
  • Once a day, the bot logs x% of the total balance as a withdrawal request. Next to the written amount option No.
  • Twice a day the bot shall calculate the withdrawal request to the wallets of the users, but only if instead of the No parameter written Ok (manual approval).
To all this:
  1. The bot can regularly be switched off, which should not affect the quality of his work.
  2. Use cron to be deleted.
Question:
Any idea how to effectively do that?
June 14th 19 at 21:04

Find more questions by tags Python