Class: Temporalio::Client::Schedule

Inherits:
Data
  • Object
show all
Defined in:
lib/temporalio/client/schedule.rb,
lib/temporalio/client/schedule.rb

Overview

A schedule for periodically running an action.

Defined Under Namespace

Modules: Action, ActionExecution, List, OverlapPolicy Classes: ActionResult, Backfill, Description, Info, Policy, Range, Spec, State, Update

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, spec:, policy: Policy.new, state: State.new) ⇒ Schedule

Create schedule

Parameters:

  • action (Action) —

    Action taken when scheduled.

  • spec (Spec) —

    When the action is taken.

  • policy (Policy) (defaults to: Policy.new) —

    Schedule policies.

  • state (State) (defaults to: State.new) —

    State of the schedule.



46
47
48
# File 'lib/temporalio/client/schedule.rb', line 46

def initialize(action:, spec:, policy: Policy.new, state: State.new)
  super
end

Instance Attribute Details

#action ⇒ Action

Returns Action taken when scheduled.

Returns:

  • (Action) —

    Action taken when scheduled.



29
30
31
# File 'lib/temporalio/client/schedule.rb', line 29

def action
  @action
end

#policy ⇒ Policy

Returns Schedule policies.

Returns:

  • (Policy) —

    Schedule policies.



29
30
31
# File 'lib/temporalio/client/schedule.rb', line 29

def policy
  @policy
end

#spec ⇒ Spec

Returns When the action is taken.

Returns:

  • (Spec) —

    When the action is taken.



29
30
31
# File 'lib/temporalio/client/schedule.rb', line 29

def spec
  @spec
end

#state ⇒ State

Returns State of the schedule.

Returns:

  • (State) —

    State of the schedule.



29
30
31
# File 'lib/temporalio/client/schedule.rb', line 29

def state
  @state
end