Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要每 30 分钟设置一次 cron 来启动和结束目前没有发生的 Adobe AIR 应用程序。我正在使用以下命令。
*/30 * * * * /opt/myapp/myapp
谁能告诉我我犯了什么错误。
我发现 cron 不执行 GUI 应用程序。只接受命令行 接受作业。
请指导我需要做什么。
应用程序无法启动,因为它不知道要连接到哪个显示器。
通常,显示器是系统中的第一个显示器,编号为零。将该行添加DISPLAY=:0到 crontab,在您的计划行之前。但请注意,如果您当时没有登录系统,或者有多个用户登录,这将失败。
DISPLAY=:0