chronic_cron 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fea60a0fa462934babe11d33f0a74fb166592f67
4
- data.tar.gz: d46e2446df7fa0a6025a3765432428d62176bd8b
3
+ metadata.gz: 726d8479ad06604da7703cf5bb9f359a8ab61062
4
+ data.tar.gz: 9672cb56eabf1b3a40f3031ec99b8461fc495df7
5
5
  SHA512:
6
- metadata.gz: 50866b94b978a64b822bdea36eabe0af2b1d6e19d5735417285824d1a10d1e971061347029b37e6e58b7baf61ad043e74d28806bea9f54bb75d351ee0ab2c68c
7
- data.tar.gz: 544ad17699d6fd9d0be85d45eb59cbaad6cdd520684c5de8ead0a147d7e8363859914cc8aab1d7ff85275266491bba9bb86a8c2394f9d9658e130a5e629519b6
6
+ metadata.gz: f3e0ce2c2834887ab316efa042a1b5dfef0affafb106767c0bd198778a27ba77d4ab4824ef4d3f6aab3e62f19f4b9cc73737214f7e75b14161ff13f49c8630d9
7
+ data.tar.gz: 796a22895b045f38d9757dbaa73e7d2a83e8e7ab867bc3289ee99e0da9ea93e7529bedc18d771001cb001a3ead56f910aea7775469cddc44c6c971b298c97df9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/chronic_cron.rb CHANGED
@@ -5,6 +5,7 @@
5
5
  require 'app-routes'
6
6
  require 'chronic'
7
7
  require 'cron_format'
8
+ require 'timetoday'
8
9
 
9
10
 
10
11
  class ChronicCron
@@ -77,6 +78,18 @@ class ChronicCron
77
78
  # e.g. every 2 days
78
79
  get(/every (\d{1,2}) days?/){|days| "* * */%s * *" % [days]}
79
80
  get(/every day/){ "0 0 * * *"}
81
+
82
+ get /any\s?time today/ do
83
+ self.instance_eval %q(
84
+ def next()
85
+ t = TimeToday.any + DAY
86
+ @cf = CronFormat.new("%s %s %s %s *" % (t)
87
+ .to_a.values_at(1,2,3,4))
88
+ t
89
+ end
90
+ )
91
+ "%s %s %s %s *" % TimeToday.future.to_a.values_at(1,2,3,4)
92
+ end
80
93
 
81
94
  end
82
95
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronic_cron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file