diff --git a/modules/ryan-services/file-manager.scm b/modules/ryan-services/file-manager.scm index 9c1493a..780ac57 100644 --- a/modules/ryan-services/file-manager.scm +++ b/modules/ryan-services/file-manager.scm @@ -38,22 +38,22 @@ (define downloads-garbage-collector-service (match-record-lambda (user) - (let ((cleanup-command #~(list "find" (string-append "/home/" #$user "/Downloads") "-mtime" "+7" "-exec" "rm" "-rf" "'{}'" ";"))) + (let ((cleanup-command #~(list "find" (string-append "/home/" #$user "/Downloads") "-mtime" "+7" "-delete"))) (shepherd-service (documentation "Garbage collect downloaded files more than 1 week old for USER.") (provision '(downloads-garbage-collector)) ;(requirement '(root)) (modules '((shepherd service timer))) (start #~(make-timer-constructor - (calendar-event #:hours '(19) #:minutes '(50) - #:days-of-week '(monday)) + (calendar-event #:hours '(08) #:minutes '(30) + #:days-of-week '(tuesday)) (command #$cleanup-command))) (stop #~(make-timer-destructor)) (actions (list (shepherd-action (name 'trigger) (documentation "Trigger GC in Downloads folder for USER") (procedure #~(lambda _ - (system (string-join #$cleanup-command " "))))))))))) + (apply system* #$cleanup-command)))))))))) (define-public downloads-garbage-collector-service-type (service-type