【问题标题】:Execute Cucumber crontab执行黄瓜 crontab
【发布时间】:2013-05-31 06:52:36
【问题描述】:

我想在我的电脑上执行黄瓜。 在终端我可以执行黄瓜(黄瓜功能) 我可以使用 crontab 但是,我不能在我的环境中 crontab 执行 shell 脚本,shell 脚本执行 jar,jar 执行 cucumber

【问题讨论】:

  • 展示你的一些尝试。我基本上建议尝试使用* * * * * /path/to/cucumber /file/to/execu.te

标签: shell jar cucumber crontab


【解决方案1】:

您可以编写一个shell脚本来调用黄瓜命令,如下所示:

/home/test.sh

#!/bin/bash

cd your_work_directory
cucumber -p test

然后执行'crontab -e'命令来编辑你的cron作业,因为crontab shell不是login-shell,所以你需要这样的代码:

0 1 * * * bash -lc '/home/test.sh'

如果你的黄瓜需要GUI环境,你的代码应该是这样的:

0 1 * * * env DISPLAY=:0 bash -lc '/home/test.sh'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-23
    • 1970-01-01
    • 2020-09-04
    相关资源
    最近更新 更多