Sha256: 584ad70c237ccfe59f0d79e039151bde8195a6952c950cf2ee7477e3456a16af

Contents?: true

Size: 940 Bytes

Versions: 2

Compression:

Stored size: 940 Bytes

Contents

#!/usr/bin/env ruby

require 'tryphon-pige-client'

Pige::Client.box_url = "http://pigebox.local"
include Pige::Client

ChunkScheduler.define do |schedule|
  # Schedule Chunks for yesterday
  schedule.day = Date.today.prev_day

  # Doesn't really Chunks, only log orders
  schedule.dry_run = true

  # Daily Chunks
  schedule.create :title => "Flash 13h %d_%m_%Y", :begin => "13:00", :duration => 15.minutes, :margin => 2.minutes

  # Only monday Chunks
  schedule.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

  # Only tuesday Chunks
  schedule.on(:tuesday) do
    # ...
  end

  schedule.on(:wednesday) do

  end

  schedule.on(:thursday) do

  end

  schedule.on(:friday) do

  end

  schedule.on(:saturday) do

  end

  schedule.on(:sunday) do

  end
end



Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tryphon-pige-client-0.0.2 examples/scheduler_chunks_daily.rb
tryphon-pige-client-0.0.1 examples/scheduler_chunks_daily.rb