How would you go about a having a function check something every ten minutes? I would like to check a directory for new files every ten minutes. I know python has a time library but can it be used for this?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
The sched module is worth a look.
for checking of files, you may want to try pyinotify
time.sleep
:you might want to look into
cron
or Scheduled Tasks services of the OS.