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 (
crondle /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Apr 07 00:05:03 -0700 2008 | |
| |
README | Thu Apr 10 02:05:16 -0700 2008 | |
| |
lib/ | Thu Apr 10 01:59:04 -0700 2008 | |
| |
spec/ | Thu Apr 10 01:59:04 -0700 2008 |
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.with_options :minute => 30, :hour => 3, :day_of_week => :sunday do
builder.desc "Run argle at 0330 on sundays"
builder.job("argle")
builder.desc "Run glarg at 0330 on sundays in july"
builder.job("glarg", :month => 7)
end
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 argle at 0330 on sundays
30 3 * * 0 argle
# Run glarg at 0330 on sundays in july
30 3 * 7 0 glarg
# Run rodney at midnight nightly
0 0 * * * rodney
# Run boner at 3am nightly
0 3 * * * boner











