26 Scheduling
| (require koyo/crontab) | package: koyo-lib | 
This module provides a syntactic form for generating components that schedule tasks using a cron-like syntax. This functionality is based on crontab: cron-like scheduling.
syntax
(crontab* [schedule-expr handler-expr] ...+) 
schedule-expr : string? 
handler-expr : (-> exact-integer? any) 
Examples:
> (define-system prod [app () (lambda () 'the-app)] [cron (app) (lambda (app) (crontab* ["* * * * * *" (lambda (timestamp) (printf "~a: ~a~n" timestamp app))]))]) > (system-start prod-system) 1762203705: the-app
> (sleep 5) 
1762203706: the-app
1762203707: the-app
1762203708: the-app
1762203709: the-app
1762203710: the-app
> (system-stop prod-system)