This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 7cf985a2b8d88bc4366b08a12fa1d4c0e34e6858
tree 1c1f7f5d0bbdbb7cf87a8bee362cf76d3495f6a3
parent 5e3d615c2e10f0bb0440e90db564c1f5b8d7e446
tree 1c1f7f5d0bbdbb7cf87a8bee362cf76d3495f6a3
parent 5e3d615c2e10f0bb0440e90db564c1f5b8d7e446
crondle /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Apr 07 00:05:03 -0700 2008 | [scrooloose] |
| |
README | Tue Apr 08 14:21:04 -0700 2008 | [halorgium] |
| |
lib/ | Tue Apr 08 14:21:04 -0700 2008 | [halorgium] |
| |
spec/ | Tue Apr 08 08:24:03 -0700 2008 | [halorgium] |
README
This is a dsl for making crontab code that ive been hacking for fun. Ill probably
make it into a gem at some stage.
Below is an example ruby file that uses crondle.
require 'lib/crondle'
Crondle.define_jobs do |builder|
builder.desc "Restart god every midnight"
builder.job "/home/admin/bin/god-restart", :minute => 0,
:hour => 0
builder.desc "Do an ls at 00:30 on the 5th day of every month"
builder.job "ls", :minute => 30,
:hour => 0,
:day_of_month => 5
builder.desc "Do a foobar every tuesday at midnight"
builder.job "foobar", :day_of_week => :tuesday,
:hour => 0,
:minute => 0
builder.desc "Run rodney at midnight nightly"
builder.daily_job "rodney"
builder.desc "Run boner at 3am nightly"
builder.daily_job "boner", 3
end
Running ruby on this file would produce the following crontab code
# Restart god every midnight
0 0 * * * /home/admin/bin/god-restart
# Do an ls at 00:30 on the 5th day of every month
30 0 5 * * ls
# Do a foobar every tuesday at midnight
0 0 * * 2 foobar
# Run rodney at midnight nightly
0 0 * * * rodney
# Run boner at 3am nightly
0 3 * * * boner




