croner 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/croner.rb +3 -0
- data/lib/croner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71d7ec1f376924be8e2810352fb1e6779682f810
|
|
4
|
+
data.tar.gz: 201feb08189a2f7631a4c4a0e884b79f374148a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 637d3fca0da9cd0a8db3a1ec4f73060f0ea1e021e41bf7f06c1af4df471881d2aa35652630b5f66fd05fefdc69a341893c7f0a1a5ad45c105b9dcb647f2708cc
|
|
7
|
+
data.tar.gz: 4bfe6da60691dff8bcae0b95b3a7b107361ceb56e66921759008665408971a68c347176b604390df2976d59e44326511664159d7a7102bbca910e1843ed16b25
|
data/README.md
CHANGED
|
@@ -16,7 +16,7 @@ $ bundle
|
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
|
-
Make `config/croner/hosts/[hostname]` and run `croner:update`.
|
|
19
|
+
Make `config/croner/hosts/[hostname]` and run task `croner:update`.
|
|
20
20
|
|
|
21
21
|
## License
|
|
22
22
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/croner.rb
CHANGED
|
@@ -9,6 +9,9 @@ module Croner
|
|
|
9
9
|
# 設定内容を取得
|
|
10
10
|
insert_rows = File.read(Rails.root.join('config', 'croner', 'hosts', `hostname`.delete("\n"))).split("\n")
|
|
11
11
|
|
|
12
|
+
# 現在のcron設定をバックアップしておく
|
|
13
|
+
`crontab -l > cron_#{Time.current.strftime('%Y%m%d%H%M%S')}.bak`
|
|
14
|
+
|
|
12
15
|
# 現在のcron設定を取得
|
|
13
16
|
cron_rows = `crontab -l`.split("\n")
|
|
14
17
|
|
data/lib/croner/version.rb
CHANGED