Skip to content

Commit

Permalink
config/cron: Update with mcron 1.1.1 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrevar committed May 23, 2018
1 parent ca38963 commit f009dd0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .config/cron/job.guile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@
(if (< currency-time (- current-time seconds-in-a-day))
;; Use next-minute to avoid overwhelming the system in case of failure.
(next-minute)
;; TODO: The following does not work while it should. Report upstream.
;; (next-hour-from (next-day) (list (tm:hour (localtime (current-time)))))
(+ (next-minute) (- 86400 (- current-time currency-time))))))
(next-hour-from (next-day) (list (tm:hour (localtime currency-time)))))))
;; A string is nicer than Scheme code for `mcron --schedule' output.
;; Otherwise we could return '(system* "units_cur" currency-file)
;; and use job's 3rd argument as a description.
(string-append "units_cur " currency-file))

(job '(next-hour)
;; '(next-hour '(3)) is broken in mcron 1.1.
"updatedb-local")
(job '(next-hour '(3)) "updatedb-local")

0 comments on commit f009dd0

Please sign in to comment.