Exec

A lightweight library for executing blocks at specified intervals. This library aims to solve the following:

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      exec:
        github: mgomes/exec
  2. Run shards install

Usage

require "exec"

Specify the execution intervals for your code blocks:

Exec.every(1.second) do
  do_work
end
Exec.every(3.hours) do
  do_work
end

Caveats