ARI - Run cron job more frequently#6939
Conversation
|
why not just |
|
I guess Much better if this is randomized across each hour. As per RFC9773 §4.3:
|
With ACME Renewal Info (RFC9773 §4.3), fetching renewal window should be more frequent, e.g. in case of revocation incident. "For instance, a server that needs to revoke certificates within 24 hours of notification of a problem might choose to reserve twelve hours for investigation, six hours for clients to fetch updated RenewalInfo objects, and six hours for clients to perform a renewal." More flexible option is to run the cron job every hour and only refresh ARI when the last one + Retry-After header is in the past.
There was a problem hiding this comment.
Pull request overview
Adjusts the installed cron schedule to run more frequently (every 6 hours) to better support ACME Renewal Info (ARI) refresh cadence during incident/revocation scenarios.
Changes:
- Change the randomized hour selection to a 6-hour bucket (
% 6) instead of daily (% 24). - Install a single cron entry that runs 4 times/day at 6-hour intervals (hour list
h,h+6,h+12,h+18).
Add support for randomized hour and update frequency Ref: * [/mo](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-create#to-schedule-a-task-to-run-every-n-hours) * [/SC HOURLY](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-create#parameters)
sim0n-v
left a comment
There was a problem hiding this comment.
Fix windows scheduler padding for StartTime and random minute/hour.
sim0n-v
left a comment
There was a problem hiding this comment.
Update the SCHTASKS to follow the same cronjob logic
|
The wiki Using systemd units instead of cron should also be updated with something like this: |
|
If you have a recent enough version of systemd ( That'll have the timer fire every 6 hours but each individual system will use a different fixed offset in that 6 hour window. |
With ACME Renewal Info (RFC9773 §4.3), fetching renewal window should be more frequent, e.g. in case of revocation incident.
This PR makes the cron job run every 6 hours (nb: the cron job is not modified during acme.sh upgrades).
More flexible option is to run the cron job even more frequently (e.g. each hour) and store the time at which fetching ARI should be made (using the
Retry-Afterheader).