2017年6月15日

linux下执行Python项目,crontab不能定时执行任务

摘要: 问题描述: 在项目下的文件执行脚本,可以手动执行 在其他文件目录下,手动执行脚本报错误,提示不存在该模块。 解决方法: 文件头加上: import sysimport ossys.path += [ os.path.dirname(os.getcwd()), os.getcwd() ]curPath 阅读全文

posted @ 2017-06-15 12:48 BDER 阅读(2388) 评论(0) 推荐(0) 编辑

导航