using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Modules.Scheduling.Triggers;
///
/// Represents a timer to periodically trigger the workflow.
///
public class Timer : EventGenerator
{
[JsonConstructor]
public Timer()
{
}
public Timer(TimeSpan interval) : this(new Input(interval))
{
}
public Timer(Input interval)
{
Interval = interval;
}
[Input] public Input Interval { get; set; } = default!;
protected override IEnumerable