EvilZone
Programming and Scripting => Scripting Languages => : pyte January 22, 2013, 10:39:28 AM
-
im trying to make some scripts execute at intervals in order to execute a task.
below is the code I've managed to write but still cant find much to brag about,
any help on how to do this will be appreciated.
import time
>>> def t():
... print"ill be back in an hour"
...
>>> if __name__=="_main_":
... while True:
... t()
... time.sleep(3600)
-
Import the scripts as modules and call each function you need separately? From the short snippet you've given here, it seems you simply want to delay execution time in between, for which time does work. More background info on what exactly this is for?
-
Yes, the script you posted will block until execution.
-
Import the scripts as modules and call each function you need separately? From the short snippet you've given here, it seems you simply want to delay execution time in between, for which time does work. More background info on what exactly this is for?
im trying to write a simple script that will be browsing through my Downloads folder forwarding every new thing that gets into the folder at an hours interval.
more like an auto backup for my downloads.
-
Maybe you should be using threads instead of blocking the main thread...