Closed fullstackzach closed 4 years ago
Using later
has definitely been both a benefit and a curse. It sounds like we should try to support dc
, so that it behaves as you'd wish.
Quick question: I don't suppose this is a schedule you'd configure using cron
syntax if given the chance? I've considered adding cron
schedule support as a "foolproof" alternative to later's syntax. Surprised to not find an open issue for it so created one now: https://github.com/renovatebot/renovate/issues/7612
I've used cron
before and would be familiar with that option if available, it sounds like a good alternative. The later
text parser normally is intuitive for a simpler schedule, but in this case the language didn't seem very intuitive. If I were scheduling a recurring meeting for example, I wouldn't say to my peers we would schedule it "on wednesday on the 1st and 3rd day instance".
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. If this question is not done (either you plan to update it or are waiting on someone to respond) then please add a comment here to bump it and/or get the other person's attention. We aim to do our best to solve every problem. This bot is here to help us clean up issues which are no longer of use to the original poster, and not to close anything prematurely, so bump as you need!
Which Renovate are you using?
Renovate Open Source CLI
Which platform are you using?
GitLab self-hosted
Have you checked the logs? Don't forget to include them if relevant
What would you like to do?
Hello Rhys and team!
I am trying to set up a schedule config where I would like to set Renovate to only open new merge requests twice monthly (every two weeks) on Wednesdays only. Eg. for 2020 upcoming November it would only open on the 4th and 18th and for December on the 2nd and 16th.
I developed this text string that it seems would work with later.js:
later.parse.text('on wednesday on the 1st and 3rd day instance')
This seems to work in later.js and I get a later.js schedule showing:
{ schedules: [ { d: [ 4 ], dc: [ 1, 3 ] } ], exceptions: [], error: -1 }
later.schedule(sched).next(10, now.toDate())
shows this output (adjusted for timezone using moment.js)I didn't want to wait until a valid schedule occurance to test and I was curious how renovate uses the later.js schedule object, so I looked into renovate code itself and found it is parsing
d
,D
t_a
,t_b
andt_y
from later.js in schedule.ts. But, it doesn't parsedc
(dayOfWeekCount). This leads me to think my schedule string will cause renovate to run weekly every Wednesday instead.Is my thinking correct and is there a different way I could set the schedule in a renovate config to achieve this?