]> gitweb.factorcode.org Git - factor.git/commitdiff
crontab: some more fixes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 23 Mar 2019 03:36:16 +0000 (20:36 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 23 Mar 2019 03:36:45 +0000 (20:36 -0700)
extra/crontab/crontab.factor

index c4189935d7a25049fad6810a0d1272afc85ebb11..fc64c932510d562c71808c50c627dfbe417cbeb1 100644 (file)
@@ -68,15 +68,18 @@ CONSTANT: aliases H{
 
     timestamp day>> :> day
     cronentry days>> [ day >= ] find nip [
-        dup day = [ drop f ] [ timestamp day<< t ] if
+        dup day = [ drop f ] [
+            timestamp 0 >>hour 0 >>minute day<< t
+        ] if
     ] [
-        timestamp cronentry days>> first >>day 1 +month
+        timestamp 0 >>hour 0 >>minute
+        cronentry days>> first >>day 1 +month
     ] if* [ cronentry timestamp (next-time-after) ] when
 
     timestamp hour>> :> hour
     cronentry hours>> [ hour >= ] find nip [
         dup hour = [ drop f ] [
-            timestamp 0 >>hour minute<< t
+            timestamp 0 >>minute hour<< t
         ] if
     ] [
         timestamp 0 >>minute