I wanted to execute my python file every 10 minutes. I am working with ubuntu instance. This statement is t working until the line of the file acess. I couldn't figure out the problem. I have tested this to /usr/bin/python
to python3
and python3.6
as well
*/10 * * * * /usr/bin/python /home/ubuntu/Deploy/sam.py >> /home/ubuntu/test.log
The file acess doesn't work. How to give the file acess ?
sam.py
print('HI')
with open("EsText.txt", "a") as myfile:
myfile.write("kugan")
myfile.close()