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.



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

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

Instance Attribute Details

#actionAction

Returns Action taken when scheduled.

Returns:

  • (Action)

    Action taken when scheduled.



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

def action
  @action
end

#policyPolicy

Returns Schedule policies.

Returns:

  • (Policy)

    Schedule policies.



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

def policy
  @policy
end

#specSpec

Returns When the action is taken.

Returns:

  • (Spec)

    When the action is taken.



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

def spec
  @spec
end

#stateState

Returns State of the schedule.

Returns:

  • (State)

    State of the schedule.



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

def state
  @state
end