wristwatch 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Readme.md +39 -0
- data/lib/wristwatch/dispatch.rb +1 -1
- data/lib/wristwatch/manifest.rb +2 -2
- data/lib/wristwatch/version.rb +1 -1
- metadata +2 -1
data/Readme.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
Wristwatch
|
2
|
+
==========
|
3
|
+
Need to run timer-based tasks, but you have no control over your cron?
|
4
|
+
Heroku's hourly cron got you puzzled? Wristwatch is here to help.
|
5
|
+
|
6
|
+
How-to
|
7
|
+
------
|
8
|
+
Tell it what to do, and which intervals to use, and Wristwatch does the
|
9
|
+
rest:
|
10
|
+
|
11
|
+
hourly "Flush unsent emails" do
|
12
|
+
Notifier.flush_unsent
|
13
|
+
end
|
14
|
+
|
15
|
+
daily "Reindex Solr" do
|
16
|
+
Rake::Task['sunspot:reindex'].execute
|
17
|
+
end
|
18
|
+
|
19
|
+
daily "Send reminder emails" do
|
20
|
+
Notifier.remind_users_to_call_mom
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
Wristwatch gives you lots of basic intervals to play with:
|
25
|
+
* hourly
|
26
|
+
* bi-hourly
|
27
|
+
* quarter-hourly
|
28
|
+
* bi-daily
|
29
|
+
* daily
|
30
|
+
* weekly
|
31
|
+
* bi-monthly
|
32
|
+
* monthly
|
33
|
+
|
34
|
+
and so on. See intervals.rb for details, and re-open it to add your own
|
35
|
+
task triggers.
|
36
|
+
|
37
|
+
Future
|
38
|
+
------
|
39
|
+
Full configuration, logging and more. Stay tuned!
|
data/lib/wristwatch/dispatch.rb
CHANGED
data/lib/wristwatch/manifest.rb
CHANGED
@@ -3,11 +3,11 @@ module Wristwatch
|
|
3
3
|
|
4
4
|
def build
|
5
5
|
instance_eval instructions
|
6
|
+
self
|
6
7
|
end
|
7
8
|
|
8
9
|
def add_task(name, *args, &blk)
|
9
|
-
|
10
|
-
self[name] = [] unless has_key?(name)
|
10
|
+
self[name] = [] unless self[name].respond_to?(:<<)
|
11
11
|
self[name] << build_task(*args, &blk)
|
12
12
|
end
|
13
13
|
|
data/lib/wristwatch/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: wristwatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Scott Burton
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- .gitignore
|
37
37
|
- Gemfile
|
38
38
|
- Rakefile
|
39
|
+
- Readme.md
|
39
40
|
- lib/core_ext/numeric.rb
|
40
41
|
- lib/wristwatch.rb
|
41
42
|
- lib/wristwatch/cron.rake
|