Skip to content

Commit

Permalink
Merge pull request #18 from mikhailbot/master
Browse files Browse the repository at this point in the history
README update for code highlighting
  • Loading branch information
ausimian committed Sep 22, 2017
2 parents 9ba7775 + 289b52f commit bfacd57
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions README.md
Expand Up @@ -9,40 +9,41 @@ Timelier is a _cron_ style scheduling application for Elixir. It will match a li

1. Add `timelier` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:timelier, "~> 0.9.2"}]
end
```

```elixir
def deps do
[{:timelier, "~> 0.9.2"}]
end
```

2. To ensure `timelier` can successfully start tasks defined in your application (or
its dependencies), add it as an [included application](http://erlang.org/doc/design_principles/included_applications.html):

```elixir
def application do
[included_applications: [:timelier]]
end
```
```elixir
def application do
[included_applications: [:timelier]]
end
```

and append it's root supervisor to the list of children that your own top-level
supervisor starts, e.g.
and append it's root supervisor to the list of children that your own top-level
supervisor starts, e.g.

```elixir
def start(_type, _args) do
import Supervisor.Spec, warn: false
```elixir
def start(_type, _args) do
import Supervisor.Spec, warn: false

# Define workers and child supervisors to be supervised
children = [
worker(YourApp.YourWorker, []),
# Other children in your supervision tree...
# Define workers and child supervisors to be supervised
children = [
worker(YourApp.YourWorker, []),
# Other children in your supervision tree...

supervisor(Timelier.Supervisor, []) # Add timelier's top-level supervisor
]
supervisor(Timelier.Supervisor, []) # Add timelier's top-level supervisor
]

opts = [strategy: :one_for_one, name: YourApp.Supervisor]
Supervisor.start_link(children, opts)
end
```
opts = [strategy: :one_for_one, name: YourApp.Supervisor]
Supervisor.start_link(children, opts)
end
```

## Configuration

Expand Down

0 comments on commit bfacd57

Please sign in to comment.