So im trying to make my ec2 instance to automatically run a python script that through Google API generates a csv with Google Analytics data. When i run:
python /path/script.py
it works fine but i set up this line in crontab
@reboot python /path/script.py
And even when the file is generated non data shows up, i believe at some point the script is failing. Any idea what could be causing this? Or how can i debug the problem? is there a log of the instance start so i can see what happens after crontab run the line?
将std_err和std_out重定向到一个单独的文件。
@reboot python /path/script.py 2>&1 /tmp/<file.log>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.