On Mon, Jan 22, 2018 at 6:07 PM, CnZhx <zhx@cnzhx.net> wrote:
On Monday, 22 January 2018 11:43:32 GMT Frederic Crozat wrote:
Le lundi 22 janvier 2018 à 10:58 +0000, CnZhx a écrit :
Thanks for the heads-up. Do you happen to know is it possible to add an option of `OnBootSec=1h` in [Timer] section of .timer file to make the process start after 1 hour after boot?
Try creating (untested)
/etc/systemd/system/btrfs-balance.timer.d/later.conf
containing:
[Timer] OnBootSec=1h
and run systemctl daemon-reload
Note that timers are triggered when either specification expires. Which means it will run 1 hour after boot *or* as otherwise specified. This was discussed recently, the only way to do it is to have second timer that triggers 1 hour after boot and starts service that starts fstrim.timer while leaving fstrim.timer itself disabled.
I have created this file and reloaded the confs by running `sudo systemctl daemon-reload`. Do you know a way to trigger it to load on next reboot? I do not want to wait for 6 days to check it because when I check the timers, it says, ``` $ systemctl list-timers NEXT LEFT LAST PASSED UNIT ACTIVATES Mon 2018-01-22 16:00:00 GMT 56min left Mon 2018-01-22 15:00:01 GMT 3min 35s ago snapper-timeline.timer snapper-t Tue 2018-01-23 00:00:00 GMT 8h left Mon 2018-01-22 08:59:46 GMT 6h ago logrotate.timer logrotate Tue 2018-01-23 09:04:52 GMT 18h left Mon 2018-01-22 09:04:52 GMT 5h 58min ago snapper-cleanup.timer snapper-c Tue 2018-01-23 09:09:52 GMT 18h left Mon 2018-01-22 09:09:52 GMT 5h 53min ago systemd-tmpfiles-clean.timer systemd-t Mon 2018-01-29 00:00:00 GMT 6 days left Mon 2018-01-22 08:59:46 GMT 6h ago btrfs-balance.timer btrfs-bal Mon 2018-01-29 00:00:00 GMT 6 days left Mon 2018-01-22 08:59:46 GMT 6h ago fstrim.timer fstrim.se Thu 2018-02-01 00:00:00 GMT 1 weeks 2 days left Sun 2018-01-07 19:40:45 GMT 2 weeks 0 days ago btrfs-scrub.timer btrfs-scr
7 timers listed. Pass --all to see loaded but inactive timers, too. lines 1-11/11 (END) ```
Cheers, Haoxian
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org