Skip to content

Commit d43dc62

Browse files
committed
push javax cronut to new internals
1 parent cfe132f commit d43dc62

File tree

11 files changed

+646
-360
lines changed

11 files changed

+646
-360
lines changed

cronut-integrant/dev-resources/config.edn

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:test.job/one {:dep-one #ig/ref :dep/one}
44

5-
:test.job/two {:identity ["job-two" "test"]
5+
:test.job/two {:identity ["test-group" "test-name"]
66
:description "test job"
77
:recover? true
88
:durable? false
@@ -11,53 +11,53 @@
1111

1212
:test.job/three {}
1313

14-
:cronut/scheduler {:update-check? false
15-
:disallowConcurrentExecution? true
16-
:schedule [;; basic interval
17-
{:job #ig/ref :test.job/one
18-
:trigger #cronut/trigger {:type :simple
19-
:interval 2
20-
:time-unit :seconds
21-
:repeat :forever}}
22-
23-
;; full interval
24-
{:job #ig/ref :test.job/two
25-
:trigger #cronut/trigger {:type :simple
26-
:interval 3000
27-
:repeat :forever
28-
:identity ["trigger-two" "test"]
29-
:description "test trigger"
30-
:start #inst "2019-01-01T00:00:00.000-00:00"
31-
:end #inst "2019-02-01T00:00:00.000-00:00"
32-
:priority 5}}
33-
34-
;; shortcut interval
35-
{:job #ig/ref :test.job/two
36-
:trigger #cronut/interval 3500}
37-
38-
;; basic cron
39-
{:job #ig/ref :test.job/two
40-
:trigger #cronut/trigger {:type :cron
41-
:cron "*/4 * * * * ?"}}
42-
43-
;; full cron
44-
{:job #ig/ref :test.job/two
45-
:trigger #cronut/trigger {:type :cron
46-
:cron "*/6 * * * * ?"
47-
:identity ["trigger-five" "test"]
48-
:description "another-test trigger"
49-
:start #inst "2018-01-01T00:00:00.000-00:00"
50-
:end #inst "2029-02-01T00:00:00.000-00:00"
51-
:time-zone "Australia/Melbourne"
52-
:priority 4}}
53-
54-
;; shortcut cron
55-
{:job #ig/ref :test.job/two
56-
:trigger #cronut/cron "*/8 * * * * ?"}
57-
58-
;; Note: This job misfires because it takes 7 seconds to run, but runs every 5 seconds, and isn't allowed to run concurrently with {:disallowConcurrentExecution? true}
59-
;; So every second job fails to run, and is just ignored with the :do-nothing :misfire rule
60-
{:job #ig/ref :test.job/three
61-
:trigger #cronut/trigger {:type :cron
62-
:cron "*/5 * * * * ?"
63-
:misfire :do-nothing}}]}}
14+
:cronut/scheduler {:update-check? false
15+
:concurrent-execution-disallowed? true
16+
:schedule [;; basic interval
17+
{:job #ig/ref :test.job/one
18+
:trigger #cronut/trigger {:type :simple
19+
:interval 2
20+
:time-unit :seconds
21+
:repeat :forever}}
22+
23+
;; full interval
24+
{:job #ig/ref :test.job/two
25+
:trigger #cronut/trigger {:type :simple
26+
:interval 3000
27+
:repeat :forever
28+
:identity ["trigger-two" "test"]
29+
:description "test trigger"
30+
:start #inst "2019-01-01T00:00:00.000-00:00"
31+
:end #inst "2019-02-01T00:00:00.000-00:00"
32+
:priority 5}}
33+
34+
;; shortcut interval
35+
{:job #ig/ref :test.job/two
36+
:trigger #cronut/interval 3500}
37+
38+
;; basic cron
39+
{:job #ig/ref :test.job/two
40+
:trigger #cronut/trigger {:type :cron
41+
:cron "*/4 * * * * ?"}}
42+
43+
;; full cron
44+
{:job #ig/ref :test.job/two
45+
:trigger #cronut/trigger {:type :cron
46+
:cron "*/6 * * * * ?"
47+
:identity ["trigger-five" "test"]
48+
:description "another-test trigger"
49+
:start #inst "2018-01-01T00:00:00.000-00:00"
50+
:end #inst "2029-02-01T00:00:00.000-00:00"
51+
:time-zone "Australia/Melbourne"
52+
:priority 4}}
53+
54+
;; shortcut cron
55+
{:job #ig/ref :test.job/two
56+
:trigger #cronut/cron "*/8 * * * * ?"}
57+
58+
;; Note: This job misfires because it takes 7 seconds to run, but runs every 5 seconds, and isn't allowed to run concurrently with {:disallowConcurrentExecution? true}
59+
;; So every second job fails to run, and is just ignored with the :do-nothing :misfire rule
60+
{:job #ig/ref :test.job/three
61+
:trigger #cronut/trigger {:type :cron
62+
:cron "*/5 * * * * ?"
63+
:misfire :do-nothing}}]}}

cronut-javax/dev-resources/config.edn

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:test.job/one {:dep-one #ig/ref :dep/one}
44

5-
:test.job/two {:identity ["job-two" "test"]
5+
:test.job/two {:identity ["test-group" "test-name"]
66
:description "test job"
77
:recover? true
88
:durable? false
@@ -11,53 +11,53 @@
1111

1212
:test.job/three {}
1313

14-
:cronut/scheduler {:update-check? false
15-
:disallowConcurrentExecution? true
16-
:schedule [;; basic interval
17-
{:job #ig/ref :test.job/one
18-
:trigger #cronut/trigger {:type :simple
19-
:interval 2
20-
:time-unit :seconds
21-
:repeat :forever}}
22-
23-
;; full interval
24-
{:job #ig/ref :test.job/two
25-
:trigger #cronut/trigger {:type :simple
26-
:interval 3000
27-
:repeat :forever
28-
:identity ["trigger-two" "test"]
29-
:description "test trigger"
30-
:start #inst "2019-01-01T00:00:00.000-00:00"
31-
:end #inst "2019-02-01T00:00:00.000-00:00"
32-
:priority 5}}
33-
34-
;; shortcut interval
35-
{:job #ig/ref :test.job/two
36-
:trigger #cronut/interval 3500}
37-
38-
;; basic cron
39-
{:job #ig/ref :test.job/two
40-
:trigger #cronut/trigger {:type :cron
41-
:cron "*/4 * * * * ?"}}
42-
43-
;; full cron
44-
{:job #ig/ref :test.job/two
45-
:trigger #cronut/trigger {:type :cron
46-
:cron "*/6 * * * * ?"
47-
:identity ["trigger-five" "test"]
48-
:description "another-test trigger"
49-
:start #inst "2018-01-01T00:00:00.000-00:00"
50-
:end #inst "2029-02-01T00:00:00.000-00:00"
51-
:time-zone "Australia/Melbourne"
52-
:priority 4}}
53-
54-
;; shortcut cron
55-
{:job #ig/ref :test.job/two
56-
:trigger #cronut/cron "*/8 * * * * ?"}
57-
58-
;; Note: This job misfires because it takes 7 seconds to run, but runs every 5 seconds, and isn't allowed to run concurrently with {:disallowConcurrentExecution? true}
59-
;; So every second job fails to run, and is just ignored with the :do-nothing :misfire rule
60-
{:job #ig/ref :test.job/three
61-
:trigger #cronut/trigger {:type :cron
62-
:cron "*/5 * * * * ?"
63-
:misfire :do-nothing}}]}}
14+
:cronut/scheduler {:update-check? false
15+
:concurrent-execution-disallowed? true
16+
:schedule [;; basic interval
17+
{:job #ig/ref :test.job/one
18+
:trigger #cronut/trigger {:type :simple
19+
:interval 2
20+
:time-unit :seconds
21+
:repeat :forever}}
22+
23+
;; full interval
24+
{:job #ig/ref :test.job/two
25+
:trigger #cronut/trigger {:type :simple
26+
:interval 3000
27+
:repeat :forever
28+
:identity ["trigger-two" "test"]
29+
:description "test trigger"
30+
:start #inst "2019-01-01T00:00:00.000-00:00"
31+
:end #inst "2019-02-01T00:00:00.000-00:00"
32+
:priority 5}}
33+
34+
;; shortcut interval
35+
{:job #ig/ref :test.job/two
36+
:trigger #cronut/interval 3500}
37+
38+
;; basic cron
39+
{:job #ig/ref :test.job/two
40+
:trigger #cronut/trigger {:type :cron
41+
:cron "*/4 * * * * ?"}}
42+
43+
;; full cron
44+
{:job #ig/ref :test.job/two
45+
:trigger #cronut/trigger {:type :cron
46+
:cron "*/6 * * * * ?"
47+
:identity ["trigger-five" "test"]
48+
:description "another-test trigger"
49+
:start #inst "2018-01-01T00:00:00.000-00:00"
50+
:end #inst "2029-02-01T00:00:00.000-00:00"
51+
:time-zone "Australia/Melbourne"
52+
:priority 4}}
53+
54+
;; shortcut cron
55+
{:job #ig/ref :test.job/two
56+
:trigger #cronut/cron "*/8 * * * * ?"}
57+
58+
;; Note: This job misfires because it takes 7 seconds to run, but runs every 5 seconds, and isn't allowed to run concurrently with {:disallowConcurrentExecution? true}
59+
;; So every second job fails to run, and is just ignored with the :do-nothing :misfire rule
60+
{:job #ig/ref :test.job/three
61+
:trigger #cronut/trigger {:type :cron
62+
:cron "*/5 * * * * ?"
63+
:misfire :do-nothing}}]}}

cronut-javax/project.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
[org.quartz-scheduler/quartz "2.4.0" :exclusions [org.slf4j/slf4j-api]]]
1515

1616
:profiles {:dev {:resource-paths ["dev-resources"]
17-
:dependencies [[ch.qos.logback/logback-classic "1.3.15"]
17+
:dependencies [[integrant "0.13.1"]
18+
[ch.qos.logback/logback-classic "1.3.15"]
1819
[org.slf4j/slf4j-api "2.0.17"]
1920
[org.clojure/core.async "1.8.741"]
2021
[clj-kondo "2025.06.05"]]}

0 commit comments

Comments
 (0)