mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-24 17:58:39 +02:00
Merge branch 'master' of github.com:plashchynski/crono
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
Crono — Job scheduler for Rails
|
Crono — Job scheduler for Rails
|
||||||
------------------------
|
------------------------
|
||||||
[](http://badge.fury.io/rb/crono)
|
[](http://badge.fury.io/rb/crono)Here's an example of a test job:
|
||||||
|
|
||||||
|
|
||||||
[](https://travis-ci.org/plashchynski/crono)
|
[](https://travis-ci.org/plashchynski/crono)
|
||||||
[](https://codeclimate.com/github/plashchynski/crono)
|
[](https://codeclimate.com/github/plashchynski/crono)
|
||||||
[](https://hakiri.io/github/plashchynski/crono/master)
|
[](https://hakiri.io/github/plashchynski/crono/master)
|
||||||
@@ -49,7 +51,7 @@ Now you are ready to move forward to create a job and schedule it.
|
|||||||
|
|
||||||
Crono can use Active Job jobs from `app/jobs/`. The only requirements is that the `perform` method should take no arguments.
|
Crono can use Active Job jobs from `app/jobs/`. The only requirements is that the `perform` method should take no arguments.
|
||||||
|
|
||||||
Here's an example of a test job:
|
Here's an example of a job:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
# app/jobs/test_job.rb
|
# app/jobs/test_job.rb
|
||||||
@@ -72,6 +74,8 @@ class TestJob # This is not an Active Job job, but pretty legal Crono job.
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
_Please note that crono uses threads, so your code should be thread-safe_
|
||||||
|
|
||||||
#### Job Schedule
|
#### Job Schedule
|
||||||
|
|
||||||
Schedule list is defined in the file `config/cronotab.rb`, that created using `crono:install`. The semantic is pretty straightforward:
|
Schedule list is defined in the file `config/cronotab.rb`, that created using `crono:install`. The semantic is pretty straightforward:
|
||||||
|
|||||||
Reference in New Issue
Block a user