【发布时间】:2013-09-01 14:17:03
【问题描述】:
我的操作系统是 Ubuntu 12.04
我正在尝试从 cron 选项卡执行一个 shell 脚本..
那个shell脚本工作正常..当我直接在命令行中执行时..就像
sh out.sh
它工作正常.. 但是当我为这个 shell 脚本设置 cron 时它不起作用
我的 shell 脚本:out.sh:
#!/bin/bash
firefox "http://localhost/acceptance/selenium-main/shell.php"
它将在 Firefox 浏览器中打开该 shell.php 网页......直接从 CLI 执行时它工作正常
..i 像这样设置 cron 作业
sudo crontab -e
然后
23 13 * * * bash /usr/share/nginx/www/acceptance/selenium-main/out.sh
这不起作用..
我什至尝试过
33 13 * * * /usr/share/nginx/www/acceptance/selenium-main/out.sh
这也不起作用..
即使我也厌倦了从 bin 执行:/usr/local/bin/out.sh
所有方法都不起作用
请建议如何解决这个问题 .. 因为 crontab 不执行 shell 脚本 ..
【问题讨论】:
标签: php bash shell cron ubuntu-12.04