Y
Y
YraganTron2016-05-31 16:48:21
Python
YraganTron, 2016-05-31 16:48:21

How to execute a query every n seconds?

Task:

write a program that will change my status in VK every 3 seconds.

Those. you need to create an infinite loop that is able to keep track of time and send a request. If I figured out the vk API, then I don’t even know how to approach the issue of time tracking.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2016-05-31
@YraganTron

import time 
while True:
    print "This prints once a minute."
    time.sleep(60)  # Delay for 1 minute (60 seconds)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question