Jenkins Cron表达不准时间 [英] Jenkins Cron Expression Not Scheduled at Right time

查看:654
本文介绍了Jenkins Cron表达不准时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部,



试图在EVERYDAY 10AM时配置jenkins作业以在下面使用cron H 10 * * * 但是jenkins控制台不是在上午10点运行,而是在10.09AM运行。请帮助我在每年的上午10点运行。





更新:添加了带有'0 10 * * *'的表达式后,显示警告并且不显示下一个运行时间。是正常的吗?

解决方案

  30 5 * * * 

每天上午5:30运行

  @daily 
pre>

将在一段时间运行作业一次,由Jenkins选择

  0 10 * * * 

>

在开始时不使用H,获得警告,您不会



您将始终看到一个语法,它将会运行,但会仍然是活动的,即它将按照语句运行。出现任何语法错误时,出现红色错误。
另外,一个好主意可能是创建一个虚拟工作来实验cron触发器,如果​​你不舒服。或在Linux上使用crontab:

  crontab -e 
man crontab


All,

Tried to configure jenkins job to trigger at EVERYDAY 10AM and used below cron H 10 * * * but the jenkins console is not running at 10AM rather its running at 10.09AM. Please help me to run at 10AM everyday around the year.

update: After adding the expression with '0 10 * * *', got below warning and no next run time is displayed. is that normal?

解决方案

30 5 * * *

will run every day at 5:30 AM

@daily

will run the job once a day at some time, chosen by Jenkins

0 10 * * *

will run every day at 10:00 AM

When not using 'H' in the beginning you will get the warning, you will not get a tip when the job will or would have run, but it will still be active, i.e. it will run as per the statement.

You will always see a syntax error in red color when making any syntax errors. Also, a good idea might be to create a dummy job to experiment with cron trigger, if you don't feel comfortable with it yet. Or use crontab on Linux:

crontab -e
man crontab

这篇关于Jenkins Cron表达不准时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆