class TableauServerClient::Resources::Schedule

Attributes

created_at[R]
frequency[R]
id[R]
name[R]
next_run_at[R]
priority[R]
state[R]
type[R]
updated_at[R]

Public Class Methods

from_collection_response(client, path, xml) { |from_response(client, "#{path}/#{id}", s)| ... } click to toggle source
# File lib/tableau_server_client/resources/schedule.rb, line 15
def self.from_collection_response(client, path, xml)
  xml.xpath("//xmlns:schedules/xmlns:schedule").each do |s|
    id = s.xpath("@id").first.value
    yield from_response(client, "#{path}/#{id}", s)
  end
end
from_response(client, path, xml) click to toggle source
# File lib/tableau_server_client/resources/schedule.rb, line 10
def self.from_response(client, path, xml)
  attrs = extract_attributes(xml)
  new(client, path, attrs)
end

Public Instance Methods

run_now(site) click to toggle source
# File lib/tableau_server_client/resources/schedule.rb, line 26
def run_now(site)
  tasks(site).map {|t| t.run_now }
end
tasks(site) click to toggle source
# File lib/tableau_server_client/resources/schedule.rb, line 22
def tasks(site)
  site.extract_refreshes.select {|t| t.schedule_id == id }
end