Created
December 4, 2012 08:37
-
-
Save albanpeignier/4201870 to your computer and use it in GitHub Desktop.
Pige Scheduler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pige::ChunkScheduler.define do |scheduling| | |
scheduling.day = Date.today.prev_day | |
scheduling.on(:monday) do | |
create :title => "Emission Cinema lundi %d_%m_%Y", :begin => "17:00", :duration => 1.hour | |
create :title => "Chronique 'A Table'", :begin => "13:00", :duration => 5.minutes, :margin => 5.minutes | |
end | |
scheduling.on(:tuesday) do | |
# ... | |
end | |
# ... | |
end | |
# will : | |
# Schedule monday | |
# Create Chunk with {:format=>"wav", :title=>"Emission Cinema lundi 03_12_2012", :begin=>2012-12-03 17:00:00 +0100, :end=>2012-12-03 18:00:00 +0100} | |
# Create Chunk with {:format=>"wav", :title=>"Chronique 'A Table'", :begin=>2012-12-03 12:55:00 +0100, :end=>2012-12-03 13:10:00 +0100} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment