-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rake task to check cronotab.rb syntax
- Loading branch information
1 parent
dc70212
commit fa97f57
Showing
5 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This is an example of a bad cronotab for tests | ||
|
||
class TestJob | ||
def perform | ||
puts 'Test!' | ||
end | ||
end | ||
|
||
# This is an error, because you can use `on` options with | ||
# a period less than 7 days. | ||
|
||
Crono.perform(TestJob).every 5.days, on: :sunday |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is an example of a good cronotab for tests | ||
|
||
class TestJob | ||
def perform | ||
puts 'Test!' | ||
end | ||
end | ||
|
||
Crono.perform(TestJob).every 5.seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters