day_planner 0.0.3 → 0.0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/lib/day_planner/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e3db46fdb6f0e4d44bbb8cf35cc3a79e5a70591
4
- data.tar.gz: 67ed162a83dc83baa7715518d81744a0102d7d73
3
+ metadata.gz: ba232608de836dc7719d47a3e0f78cf666bf2959
4
+ data.tar.gz: 27f627cf08e43c49920dc264b08e68515bd57b49
5
5
  SHA512:
6
- metadata.gz: 6499ba96a636101542b4099a3fa5827516756cc1112e7cde358ef854e3579d59954171b125758515ac7e8c41459f0bffc23fc32334b03f817fc8fc31d3b1eae8
7
- data.tar.gz: 072b2e04e07eb1e63a68fff4246899416a6a3af2c1a4c9067899c1b0d72e8f1f12a899b753d7e22b612817cbaade3e7209301579f4cce39b7db1e5e608fd2c80
6
+ metadata.gz: c5b6e762927a4d64dc2b1787fc77af13c43a45cc70235a19d94e3523491b7eff1272dff13f1f795e4e3deffc3d409181f20cd06c268b212cfe399d05525f76c2
7
+ data.tar.gz: 08ab525349d6e9b54a840c6e86ddd95b0f6e380604fdc1dcb76de2ec2f0a2223d6eefd2494437f77cea215544e9a58570f314d1b4281e11452c0cb289d52a630
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DayPlanner
2
2
 
3
- Day Planner is a simple tool to manage in-process execution of scheduled tasks. There are a lot of tools for running scheduled tasks outside the process ([Clockwork](http://rubygems.org/gems/clockwork) is probably what you're looking for if you want an elegant implementation of scheduled tasks outside the main process.)
3
+ Day Planner is a simple tool to manage in-process execution of scheduled tasks. There are a lot of tools for running scheduled tasks outside the process ([Clockwork](http://rubygems.org/gems/clockwork) is probably what you're looking for if you want an elegant implementation of scheduled tasks outside the main process).
4
4
 
5
5
  I wrote this because I needed a simple, lightweight tool to schedule small, light tasks on an application running on Heroku, without the extra cost of a dedicated clock process to handle it, but executing more frequently than Heroku's free scheduler permits.
6
6
 
@@ -24,7 +24,7 @@ If you're using Rails, it'll expect to find a file listing scheduled tasks in 'c
24
24
 
25
25
  ## Usage
26
26
 
27
- Here's an example of a scheduled task:
27
+ Here's an example of a scheduled task, living in (app)/config/day_planner_tasks.rb (this is the required/automatic location of the schedule file if you're using Rails):
28
28
 
29
29
  DayPlanner.schedule(every: 2.minutes) do
30
30
  MyClass.my_class_method
@@ -34,6 +34,8 @@ Obviously you only get those cute little time methods in Rails; otherwise, pass
34
34
 
35
35
  The tasks in the schedule will each be performed on startup and then thereafter according to their stated intervals.
36
36
 
37
+ I'm not doing a whole damn ton to protect you from tasks that throw errors, but there is a begin/rescue/end up in there at some point. I definitely am not protecting you from a process that just won't end or anything like that. Given that each task is run in its own thread, you have reasonable assurance that they are occuring at whatever interval you specify plus a very small amount of overhead.
38
+
37
39
  By default, DayPlanner checks for tasks to be performed once per minute. You have the power to change this:
38
40
 
39
41
  DayPlanner.interval = 5.seconds
@@ -42,9 +44,13 @@ Or, like
42
44
 
43
45
  DayPlanner.interval = 5
44
46
 
45
- Note that if you try to schedule a task with an interval shorter than DayPlanner's interval, it'll complain and fail. If you shorten DayPlanner's interval to less than that of one of its tasks, it'll probably also complain and fail. Use your best judgment.
47
+ Note that if you try to schedule a task with an interval shorter than DayPlanner's interval, it'll complain and fail. If you shorten DayPlanner's interval to less than that of one of its tasks, it'll complain but not fail. It obviously will only run at scheduler thread's intervals. Use your best judgment.
48
+
49
+ Specify your preferred interval (and whatever other goodies may be waiting in the pipeline) in config/day_planner_tasks.rb. Note that you probably won't manage to precede that first minute-long wait. I may default to a shorter value in the future. I dunno. Don't pressure me.
50
+
51
+ ### Non-Rails uses
46
52
 
47
- Specify these things in config/day_planner_tasks.rb. Note that you probably won't manage to precede that first minute-long wait. I may default to a shorter value in the future. I dunno.
53
+ I sort of think it might work without Rails, keeping in mind the various aforementioned caveats? I'm not really sure. If it totally doesn't, I'd appreciate feedback.
48
54
 
49
55
  ## Contributing
50
56
 
@@ -2,7 +2,7 @@ module DayPlanner
2
2
  MAJOR = 0
3
3
  MINOR = 0
4
4
  TINY = 3
5
- BUILD = nil
5
+ BUILD = 1
6
6
 
7
7
  VERSION = [MAJOR, MINOR, TINY, BUILD].compact.join(".")
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: day_planner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damon Siefert
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.0.14
78
+ rubygems_version: 2.0.3
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Built to have a way to schedule tasks without running an extra process and