【发布时间】:2016-02-18 19:32:47
【问题描述】:
我正在运行一个使用 Selenium 的 Python 脚本的 cron 作业。 Selenium 需要显示器,所以我有 installed Xvfb, started the display, and firefox:
sudo Xvfb :10 -ac
export DISPLAY=:10
firefox
这在我在控制台中运行这些命令时有效,但我希望能够使用 cron 来完成。我怎样才能做到这一点?如果我以主用户身份运行虚拟显示器,他们是否可以在 Python 脚本/Selenium 需要时访问虚拟显示器?
【问题讨论】:
标签: python bash ubuntu selenium cron