resticprofile
resticprofile copied to clipboard
crond: add support for crontab file only (on any OS)
Implements #288
The PR allows to use an external scheduler that supports crontab format when configured as:
global:
scheduler: "crontab: /path/to/crontab/file"
(this is available on any OS)
The existing crond support using the crontab binary remains unchanged for linux
waiting on #259 before implementing remaining tests
This would also help with #321 as I realised that the crond implementation in busybox (alpine linux) has funny rules when trying to run as a non-root user. It doesn't work with the current implementation of using crontab to set or update the scheduling.
Codecov Report
Attention: Patch coverage is 78.00000% with 66 lines in your changes are missing coverage. Please review.
Project coverage is 71.51%. Comparing base (
85d5afc) to head (957db95).
Additional details and impacted files
@@ Coverage Diff @@
## master #289 +/- ##
==========================================
+ Coverage 71.07% 71.51% +0.44%
==========================================
Files 121 121
Lines 12394 12659 +265
==========================================
+ Hits 8809 9053 +244
- Misses 3189 3201 +12
- Partials 396 405 +9
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 71.51% <78.00%> (+0.44%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Had tested all options manually, think it is ready now.
Yes. Supersonic is one option to have a compatible task scheduler that is OS independent (besides that it needs to run as service)
The use case with alpine should work as well. Had used busybox’s cron with custom crontab files previously.
The use case with alpine should work as well. Had used busybox’s cron with custom crontab files previously.
Yes it works when running as root. With this PR I managed to get resticprofile scheduled as a non-privileged user (using Supercronic). I'll add a contrib for it.
I'm also tempted to provide another docker image with running resticprofile as a non-privileged user.