Reputation: 2738
I have a very basic python script to run through crontab for every minutes.
The Script
filed = open('test.txt','a')
Crontab
* * * * * /to path the file/job.py
It should work, but i have not been able to see the results. So, what could be the problem ?
Upvotes: 1
Views: 212
Reputation: 1125078
You need to open text.txt
using an absolute path; the crondaemon may well be using different path from what you expect:
filed = open('/home/john/Desktop/test.txt','a')
Upvotes: 6