I have a task in Python and i run this task for first time and i want after 60 second run the same task but only one last time.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want something done twice with a gap, the simplest way is just to sleep for a bit:
Note that this could not be suitable if you need precisely 60 seconds.
In that case, you may want to store the time before the sleep and compare to ensure the right amount of time has passed, for example, but in most cases it doesn’t need to be so precise.
Note that this pauses execution, if you want to do this with other things going on, you will need to look into threading.