Python Selenium Script无法在crontab上运行

时间:2018-05-22 12:38:43

标签: python selenium selenium-webdriver cron

我有一个Python Selenium脚本,当我在我的服务器上手动运行时工作正常,但当我尝试使用Crontab(通过cron.weekly文件夹)在.sh中运行它时,我不断收到以下错误:

selenium.common.exceptions.WebDriverException:消息:'geckodriver'可执行文件需要在PATH中。

我觉得这很奇怪,因为在我的sh中,在运行程序之前,我做了

导出PATH = $ PATH:/ path / to / geckodriver(使用正确的路径)

为什么会发生这种情况?

0 个答案:

没有答案
相关问题