无人机克隆工作不开火
我使用以下命令
cron add-Branch Master“ foo/bar”“ avery-5-mins”“ 0 */5 * * * * * * * * * *”
当我看UI时,我可以看到创建了Cron的作业。但是,即使我在无人机yaml文件中定义了它,它也不会发射。
- name: cron-job
pull: if-not-exists
image: foo-image
commands:
- *random
- echo "I am testing a cron job"
when: &cron-demo
event:
- cron
cron:
- every-5-mins
需要做其他事情以使其按计划工作吗?
而且,是否有一种手动触发Cron工作的方法?我似乎在文档中找不到任何东西。
I've created a cron job in Drone CI using the following command
drone cron add --branch master "foo/bar" "every-5-mins" "0 */5 * * * *"
And when I look in the UI, I can see the cron job has been created. However, it doesn't fire, even though I have it defined in my drone yaml file.
- name: cron-job
pull: if-not-exists
image: foo-image
commands:
- *random
- echo "I am testing a cron job"
when: &cron-demo
event:
- cron
cron:
- every-5-mins
Does something else need to be done to get it to work on schedule?
And also, is there a way to manually trigger a cron job? I can't seem to find anything in the docs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能会发现这很有帮助。
https://docs.drone.io/api/cron/cron_trigger/
基本上,您需要的就是这样。
You might find this helpful.
https://docs.drone.io/api/cron/cron_trigger/
Basically, what you need is something like this.