1
2
3
4
5
6
7
8
9
10
11
12 | #!/usr/bin/python
# coding: utf-8
import datetime
import time
with open('/root/etc_init_tester/etc_init_tester.log', 'a') as f:
while True:
f.write(u'{0}\n'.format(datetime.datetime.now()))
time.sleep(3) # seconds
|