SquidMesh.Plugins.Cron (squid_mesh v0.1.0-alpha.3)

Copy Markdown View Source

Host-app opt-in plugin that activates cron workflow triggers through Oban.

The plugin groups cron workflows by timezone and starts one Oban.Plugins.Cron child per timezone. Workflow runs are still created through Squid Mesh's public API and dispatched through the configured execution queue.

Summary

Functions

Returns a specification to start this module under a supervisor.

Forces the wrapped Oban cron children to evaluate immediately.

Types

option()

@type option() :: Oban.Plugin.option() | {:workflows, [module()]}

Functions

child_spec(init_arg)

@spec child_spec(Keyword.t()) :: Supervisor.child_spec()

Returns a specification to start this module under a supervisor.

See Supervisor.

evaluate(plugin)

@spec evaluate(Supervisor.supervisor()) :: :ok

Forces the wrapped Oban cron children to evaluate immediately.

This is useful in tests and smoke paths where the host app needs to exercise cron activation without waiting for the next scheduler tick.