[英]Python Script can be executed manually but not by using Crontab
I also used shebang #!/usr/bin/env python
我还使用了 shebang #!/usr/bin/env python
My script is executable also I am currently using pattern我的脚本也是可执行的,我目前正在使用模式
* * * * * /usr/local/bin/python3.5m file_name.py
other pattern:其他模式:
dir_path && usr/local/bin/python3.5m dir_path/file_name.py
The location of python3.5m is incorrect. python3.5m的位置不对。 python3.5m is provided by the python3.5-minimal package in Ubuntu 16.04, and the path to the python3.5m executable file is /usr/bin/python3.5m
. python3.5m由Ubuntu 16.04中的python3.5-minimal package提供,python3.5m可执行文件的路径为/usr/bin/python3.5m
。 The correct crontab pattern is:正确的 crontab 模式是:
* * * * * /usr/bin/python3.5m file_name.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.