I want a way to test our network speed every 10 mins automatically and record the output, I found this python https://pypi.python.org/pypi/speedtest-cli and wanted to know if there is a way I could make a program that will run the command sleep for a few mins and then run it again capturing the output every time and logging it into a file.
The easiest way is to run a cronjob with also the date as name of the log file so after that you can analyse the logs.
Python logging: python logging
You can also use greylog for logging in python, its simple and very useful: greylog
Cronjob with date: Cronjob