Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cron schedule to fix Renovate #6835

Closed
wants to merge 1 commit into from

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Dec 28, 2022

In our renovate.json we have:

    "schedule": ["on the 3rd day of the month"]

But Renovate PRs are being created immediately, for example:

I understand Later.js is used for scheduling, and if I run this code at https://npm.runkit.com/:

var later = require('later');
var sched = later.parse.text('on the 3rd day of the month'),
      occurrences = later.schedule(sched).next(10);

for(var i = 0; i < 5; i++) {
  console.log(occurrences[i]);
}

I get the expected output for the third day of each month:

Tue Jan 03 2023 02:00:00 GMT+0200 (Eastern European Standard Time)
Fri Feb 03 2023 02:00:00 GMT+0200 (Eastern European Standard Time)
Fri Mar 03 2023 02:00:00 GMT+0200 (Eastern European Standard Time)
Mon Apr 03 2023 03:00:00 GMT+0300 (Eastern European Summer Time)
Wed May 03 2023 03:00:00 GMT+0300 (Eastern European Summer Time)

I asked about this at renovatebot/renovate#19513, one suggestion was to use cron scheduling instead.

So let's try 0 12 3 * *.

@radarhere
Copy link
Member

#6604 has a feature, "Check this box to trigger a request for Renovate to run again on this repository".

I ran this to create #6813.
My memory is not good enough to know about the other two. You can look at the edit log on the first post of #6604 and draw your own conclusions.

So I'm not convinced this is a bug. My understanding is that the monthly schedule is to minimise spontaneous disruptions of the GitHub Actions queue. But if there is nothing running at a given time, I imagined it was ok to manually trigger it?

Alternatively, if you just feel that the cron format is clearer, then sure.

@hugovk
Copy link
Member Author

hugovk commented Dec 29, 2022

Ah, that'll explain it then :) Looks like two were from the checkbox and the other was actually on the 3rd day. So yes, looks like things are working correctly. Thanks!

"on the 3rd day of the month" is more readable than a cron format, so let's close this.

My understanding is that the monthly schedule is to minimise spontaneous disruptions of the GitHub Actions queue. But if there is nothing running at a given time, I imagined it was ok to manually trigger it?

A monthly schedule can also help minimise noise: in most cases we don't need to update these very often, and a ~monthly schedule is good to stop things getting too old. And it can group them updates into a single PR, so we could leave it to the bot. (The 3rd was chosen to avoid release days and other repo schedules.)

But sure, it's fine to trigger more often if you like.

@hugovk hugovk closed this Dec 29, 2022
@hugovk hugovk deleted the fix-renovate-schedule branch January 8, 2023 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants