bash - 使用 cron 运行带有 Xvfb 显示的 sh?
问题描述
我正在尝试使用 cron 运行 sh 脚本。此脚本需要显示。
我努力了:
# Xvfb display
/usr/bin/Xvfb :10 -ac -screen 0 1024x768x24 &
41 18 * * * /bin/sh /path/to/script/script.sh > /path/to/log/log.log 2>&1
什么也没发生,log.log 也没有创建。
第二次尝试:
43 18 * * * <user> export DISPLAY=:10 /bin/sh /path/to/script/script.sh > /path/to/log/log.log 2>&1
同样的结果没有日志文件。
(ubuntu) CMD (export DISPLAY=:10 /bin/sh /ibc.paper/twsstart.sh > /crontry.log 2>&1) Jun 14 18:43:01 CRON[1809]: (CRON) info (No MTA已安装,丢弃输出)
我一直在尝试所有我能想到的东西,但没有任何效果。
有人可以告诉我要检查什么吗?
解决方案
推荐阅读
- python - 访问未通过 perfplot 相等性检查的数据
- sql - 在嵌套 JSON 模式中查询整个 JSON 文档
- javascript - 在剧作家的第一个浏览器实例之后保持登录会话
- python - 避免语法错误:未知字体标签“Helvetica”
- ag-grid - ag-grid 防止扩展分组数据
- regex - 如何对带有特殊字符的短语进行不区分大小写的匹配?
- javascript - 如果值等于对象数组中对象的键,则返回该对象的值 javasciprt
- sql - sql - 基于另一个表(日期范围)上的列的条件查询
- r - 带有保存按钮的 R 闪亮模块
- python - 熊猫时间序列重采样+线性调整值