time_scheduler 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +14 -11
- data/README.ja.adoc +14 -10
- data/lib/time_scheduler/version.rb +1 -1
- data/time_scheduler.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dd3e563565d592dbc78bad3a0c306fa85817dad4b17a615147c04c0daca0fa0
|
4
|
+
data.tar.gz: 324db4ac4818cf66de0f31922f5478892ce510caa791dd904158a2639256d91d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 125b52b655af7eedb23216fd870d19a1a52575afd112efff44636e299b134c31b45b31bb2056f8bc0596fdc6a18df538e3cbb2c97e9beba0fd7510c3159433a7
|
7
|
+
data.tar.gz: 50f132d18ea8faa5cf0bdf7da4e1e65642b13182e0501c3bd1c5a4a071a970bf6395c48010d8648f031b89045cccab56d9ec69dde0290a9afe41b2d3e5aeb312
|
data/README.adoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= TimeScheduler
|
2
2
|
|
3
|
-
|
3
|
+
Yet another library for single/periodical event scheduler.
|
4
4
|
|
5
5
|
== Installation
|
6
6
|
|
@@ -98,18 +98,18 @@ TimeScheduler.new
|
|
98
98
|
[source,ruby]
|
99
99
|
----
|
100
100
|
TimeScheduler#wait( topic = Time.now.iso8601(6),
|
101
|
-
|
102
|
-
|
101
|
+
at: nil, cron: nil, year: nil, month: nil, day: nil, wday: nil, hour: nil, min: nil, sec: 0, msec: nil,
|
102
|
+
&block )
|
103
103
|
----
|
104
104
|
|
105
105
|
* Result:
|
106
|
-
** with block:
|
107
|
-
*** topic
|
108
|
-
** without block:
|
109
|
-
*** event time.
|
106
|
+
** with block: (Non-blocing Mode)
|
107
|
+
*** topic: event identify topic for operation.
|
108
|
+
** without block: (Blocking Mode)
|
109
|
+
*** time: event time. time object.
|
110
110
|
|
111
111
|
* Parameter:
|
112
|
-
** topic: topic for
|
112
|
+
** topic: event identify topic for operation. (default: Time.now.iso8601(6))
|
113
113
|
** at: time. Time or String object. (default: nil)
|
114
114
|
** cron: set of min, hour, day, month, wday pattern. (default: nil)
|
115
115
|
** year: year. unlimited range is denied. (default: nil)
|
@@ -122,6 +122,9 @@ TimeScheduler#wait( topic = Time.now.iso8601(6),
|
|
122
122
|
** msec: millisecond. 0..999. (default: nil), If msec is assigned, then other parameters are ignored.
|
123
123
|
In detail, it can use "*" as wildcard.
|
124
124
|
|
125
|
+
* Block Parameter:
|
126
|
+
** time: event time. time object.
|
127
|
+
|
125
128
|
=== Get event topics.
|
126
129
|
|
127
130
|
[source,ruby]
|
@@ -130,7 +133,7 @@ TimeScheduler#topics
|
|
130
133
|
----
|
131
134
|
|
132
135
|
* Result:
|
133
|
-
** array of topics.
|
136
|
+
** topics: array of topics.
|
134
137
|
|
135
138
|
* Parameter:
|
136
139
|
** none.
|
@@ -146,7 +149,7 @@ TimeScheduler#cancel( *topics )
|
|
146
149
|
** nil.
|
147
150
|
|
148
151
|
* Parameter:
|
149
|
-
** topic: topic for
|
152
|
+
** topic: topic for cancel operation.
|
150
153
|
|
151
154
|
=== Check activity.
|
152
155
|
|
@@ -197,4 +200,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/arimay
|
|
197
200
|
|
198
201
|
== License
|
199
202
|
|
200
|
-
The gem is available as open source under the terms of the
|
203
|
+
The gem is available as open source under the terms of the http://opensource.org/licenses/MIT[MIT License].
|
data/README.ja.adoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= TimeScheduler
|
2
2
|
|
3
|
-
|
3
|
+
一度の/周期的なイベントスケジューラのライブラリのひとつ。
|
4
4
|
|
5
5
|
== 導入
|
6
6
|
|
@@ -98,17 +98,18 @@ TimeScheduler.new
|
|
98
98
|
[source,ruby]
|
99
99
|
----
|
100
100
|
TimeScheduler#wait( topic = Time.now.iso8601(6),
|
101
|
-
|
102
|
-
|
101
|
+
at: nil, cron: nil, year: nil, month: nil, day: nil, wday: nil, hour: nil, min: nil, sec: 0, msec: nil,
|
102
|
+
&block )
|
103
103
|
----
|
104
104
|
|
105
105
|
* Result:
|
106
|
-
**
|
107
|
-
*** topic
|
108
|
-
**
|
109
|
-
***
|
106
|
+
** ブロック引数あり: (Non-blocing Mode)
|
107
|
+
*** topic. イベント操作用識別トピック.
|
108
|
+
** ブロック引数なし: (Blocking Mode)
|
109
|
+
*** time. イベント日時. Time オブジェクト.
|
110
110
|
|
111
111
|
* Parameter:
|
112
|
+
** topic: イベント操作用識別トピック (default: Time.now.iso8601(6))
|
112
113
|
** at: 日時. Time または String オブジェクト. (default: nil)
|
113
114
|
** cron: 分、時、日、月、曜パターンのセット. (default: nil)
|
114
115
|
** year: 年. 範囲制限なしは拒否される. (default: nil)
|
@@ -121,6 +122,9 @@ TimeScheduler#wait( topic = Time.now.iso8601(6),
|
|
121
122
|
** msec: ミリ秒. 0..999. (default: nil), ミリ秒が指定されたとき, 他のパラメータは無視される.
|
122
123
|
詳細では, ワイルドカードとして "*" を使用できる.
|
123
124
|
|
125
|
+
* Block Parameter:
|
126
|
+
** time: イベント日時. Time オブジェクト.
|
127
|
+
|
124
128
|
=== トピック名を得る.
|
125
129
|
|
126
130
|
[source,ruby]
|
@@ -129,7 +133,7 @@ TimeScheduler#topics
|
|
129
133
|
----
|
130
134
|
|
131
135
|
* Result:
|
132
|
-
**
|
136
|
+
** topics: トピック配列.
|
133
137
|
|
134
138
|
* Parameter:
|
135
139
|
** なし.
|
@@ -145,7 +149,7 @@ TimeScheduler#cancel( *topics )
|
|
145
149
|
** nil.
|
146
150
|
|
147
151
|
* Parameter:
|
148
|
-
** topic:
|
152
|
+
** topic: 取消対象のトピック.
|
149
153
|
|
150
154
|
=== 稼働中か調べる.
|
151
155
|
|
@@ -168,7 +172,7 @@ TimeScheduler#suspend
|
|
168
172
|
----
|
169
173
|
|
170
174
|
* Result:
|
171
|
-
|
175
|
+
** nil.
|
172
176
|
|
173
177
|
* Parameter:
|
174
178
|
** なし.
|
data/time_scheduler.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["arima.yasuhiro@gmail.com"]
|
10
10
|
|
11
11
|
spec.summary = %q{ Library for simple event scheduler. }
|
12
|
-
spec.description = %q{
|
12
|
+
spec.description = %q{ Yet another library for single/periodical event scheduler. }
|
13
13
|
spec.homepage = "https://github.com/arimay/time_scheduler"
|
14
14
|
|
15
15
|
# Specify which files should be added to the gem when it is released.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arimay
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
description: "
|
55
|
+
description: " Yet another library for single/periodical event scheduler. "
|
56
56
|
email:
|
57
57
|
- arima.yasuhiro@gmail.com
|
58
58
|
executables: []
|