Closed danielcompton closed 3 years ago
@danielcompton Did you want to follow up on https://github.com/DomT4/homebrew-autoupdate/pull/27 or are you happy for someone else to explore the changes discussed here?
Happy for anyone to take this, I don't have a lot of time at the moment sorry!
One question to answer about this is whether we would want to continue to support --start [interval]
, or to only support (for example) --cron 0 0 * * *
. It is probably fine to keep supporting both, but I'd suggest changing the default to --cron
(or whatever it's called) as that has semantics closer to what people expect and want.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
StartCalendarInterval
The man page for
launchd.plist
says:This currently uses StartInterval:
https://github.com/DomT4/homebrew-autoupdate/blob/9aa7e9cbe6baea53dc2ff4e2679cabf1de3424d5/lib/autoupdate/start.rb#L91-L92.
This means that Homebrew autoupdate may not be run if it happens to be asleep when the timer would normally fire. I've noticed this myself a few times and was surprised by it.
I think it could be good to use StartCalendarInterval, either as an option, or a replacement for StartInterval. StartCalendarInterval is basically a cron expression.
An easier alternative would be to document this limitation, and encourage people to check often enough that they won't miss too many updates from their computer being asleep.
RunAtLoad
The man page also says:
We should probably remove this key to avoid doing a bunch of work in the background on boot.
ProcessType
We should also look at setting the ProcessType to Background