4 ms·
I still wish there were a few more examples of actual guile cron jobs, but there is one example which illustrates the power of using guile for defining cron job
by _emacsomancer_ 8y ago
I still wish there were a few more examples of actual guile cron jobs, but there is one example which illustrates the power of using guile for defining cron jobs in the 'every second Sunday' example:
(job (lambda (current-time)
(let* ((next-month (next-month-from current-time))
(first-day (tm:wday (localtime next-month)))
(second-sunday (if (eqv? first-day 0)
8
(- 14 first-day))))
(+ next-month (* 24 60 60 second-sunday))))
"my-program")