javan/whenever — pull request #313 by ndbroadbent (2013-02-04 01:13:29+00:00)
Title: Allow times in seconds by chaining together tasks prefixed with multiple sleep commands

Here's a way to support commands that need to run very frequently. If the time is less than a minute, it multiples the task and prefixes each group with different `sleep` durations.

For example,

```ruby
every 10.seconds do
command 'echo "running frequent command"'
end
```

produces:

```
* * * * * /bin/bash -l -c '(echo "running frequent command") &
(sleep 10 && echo "running frequent command") &
(sleep 20 && echo "running frequent command") &
(sleep 30 && echo "running frequent command") &
(sleep 40 && echo "running frequent command") &
(sleep 50 && echo "running frequent command")'
```

(all on one line.)

Just an idea, but I found it to be pretty useful.