Python :: python save log to from crontab
Out put :: date time
Run relay.py 06/20/16 15:58:10
Run relay.py 06/20/16 15:59:11
- import time
- print ("Run relay.py " + time.strftime("%x") + " " + time.strftime("%X"))
Out put :: date time
Run relay.py 06/20/16 15:58:10
Run relay.py 06/20/16 15:59:11
- crontab -e
- 0 0 * * 1-6 python /home/pi/relay.py >> /home/pi/relay.log 2>&1
No comments:
Post a Comment