Renovate Bot Schedule configuration for biweekly renovate PRs is not working

200 Views Asked by At

I've been trying to set the Renovate PRs to be created biweekly, or once a month, but the schedule does not seem to work. I've checked in the Renovate Docs, and the schedule I used does seem to follow the patterns of the docs, but no renovate PRs are being created.

I've tried these schedule configs in the renovate.json:

"schedule": ["every weekend"] // this works
"schedule": ["every 2 weeks"] // does not work
"schedule": ["before 4am on the first day of the month"], // does not work

Please let me know if you have any idea why it's not working, if you need other info, or share any schedule configs that work for you! I'd like to run it less frequently, since there's a lot of noise for ie. AWS SDK packages that are updates very often, and it's not really manageable for my team if multiple projects have weekly Renovate PRs..

2

There are 2 best solutions below

0
gizmo On BEST ANSWER

I've fixed it by using a cron schedule, it seems the "natural language" schedules are not really reliable although the docs make them out to be..

"schedule": ["* * 1 * *"]

This schedule creates new renovate PRs on the first day of every month.

0
Kuba On

As you discovered yourself, you can use cron syntax. To run renovate every two weeks, you could run it at 1st and 15th day of the month. This isn't perfectly every 14 days, but I think it's good enough:

{
  "schedule": ["* * 1,15 * *"]
}

Just make sure to use * in place of minutes, as renovate doesn't support this level of granularity.

Additionally you can set schedule on per-package basis:

{
  "packageRules": [
    {
      "matchPackageNames": ["aws-sdk"],
      "extends": ["schedule:monthly"]
    }
  ]
}

which could help with the noise AWS SDK generated. Renovate docs also have a page that describe how to reduce the noise, which is worth reading.