Home > Software design >  How can I get bot to auto-run at a certain time, or when a certain condition is satisfied?
How can I get bot to auto-run at a certain time, or when a certain condition is satisfied?

Time:03-04

I'm building a basic Instagram bot, and it got me wondering, how could I get to auto-run at a certain time, or when a certain condition is satisfied (eg. when there's a new file in a folder)?

Help much appreciated.

CodePudding user response:

make a while loop and check your condition each time, suggest you to put some kind of sleep (eg. asynco.sleep() or time.sleep()) and if the condition is true then run the bot

  • Related