Yep, thanks. In my last update I did the same cron as you. Do you happen to know how does the triggers directive actually works with a declarative pipeline (Jenkinsfile)? how does it tell Jenkins to actually start the job at the specified hours?
On Friday, April 7, 2017 at 5:08:54 PM UTC+3, Mark Waite wrote: > > That same exception is reported when you enter that cron specification > into the "Poll SCM" field of a freestyle job. > > I think the issue is that you have six fields in your cron specification, > while the online help indicates it only accepts 5 fields. > > I think you want 'H 12,16,20 * * 1-4,7' or if you really want it at the > start of the hour rather than at some time during the hour, then '0 > 12,16,20 * * 1-4,7'. > > Mark Waite > > On Fri, Apr 7, 2017 at 8:00 AM Idan Adar <[email protected] <javascript:>> > wrote: > >> oops... disregard the snippet, it was wrong (but the failure is there >> anyway). >> >> The following is the cron used. >> I am attempting to run the job at 12:00, 16:00 and 20:00 on >> Sunday-Thursday... (every week, every month, every year). >> >> triggers { >> cron '0 12,16,20 * * 1-4,7 *' >> } >> >> The error is the following. Why? >> >> Caused by: antlr.ANTLRException: Invalid input: "0 12,16,20 * * 1-4,7 *": >> line 1:21: expecting EOF, found ' ' >> >> >> The documentation states that "The Unix cron style syntax is supported." >> I thus used the following as reference: >> http://www.nncron.ru/help/EN/working/cron-format.htm >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/3b6ffda4-1804-420f-9b14-6191ff85c578%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/3b6ffda4-1804-420f-9b14-6191ff85c578%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/69b05c91-d523-4574-b37a-6fa4ae26c7ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
