UbiNadeoApi.Scheduler (ubi_nadeo_api v0.1.0)

Defines a quantum Scheduler.

When used, the quantum scheduler expects the :otp_app as option. The :otp_app should point to an OTP application that has the quantum runner configuration. For example, the quantum scheduler:

defmodule UbiNadeoApi.Scheduler do
  use Quantum, otp_app: :ubi_nadeo_api
end

Could be configured with:

config :ubi_nadeo_api, UbiNadeoApi.Scheduler,
  jobs: [
    {"@daily", {Backup, :backup, []}},
  ]

Configuration:

  • :clock_broadcaster_name - GenServer name of clock broadcaster

    (unstable, may break without major release until declared stable)

  • :execution_broadcaster_name - GenServer name of execution broadcaster

    (unstable, may break without major release until declared stable)

  • :executor_supervisor_name - GenServer name of execution supervisor

    (unstable, may break without major release until declared stable)

  • :debug_logging - Turn on debug logging

  • :jobs - list of cron jobs to execute

  • :job_broadcaster_name - GenServer name of job broadcaster

    (unstable, may break without major release until declared stable)

  • :name - GenServer name of scheduler

    (unstable, may break without major release until declared stable)

  • :node_selector_broadcaster_name - GenServer name of node selector broadcaster

    (unstable, may break without major release until declared stable)

  • :overlap - Default overlap of new Job

  • :otp_app - Application where scheduler runs

  • :run_strategy - Default Run Strategy of new Job

  • :schedule - Default schedule of new Job

  • :storage - Storage to use for persistence

  • :storage_name - GenServer name of storage

    (unstable, may break without major release until declared stable)

  • :supervisor_module - Module to supervise scheduler

    Can be overwritten to supervise processes differently (for example for clustering)

    (unstable, may break without major release until declared stable)

  • :task_registry_name - GenServer name of task registry

    (unstable, may break without major release until declared stable)

  • :task_supervisor_name - GenServer name of task supervisor

    (unstable, may break without major release until declared stable)

  • :timeout - Sometimes, you may come across GenServer timeout errors esp. when you have too many jobs or high load. The default GenServer.call/3 timeout is 5_000.

  • :timezone - Default timezone of new Job

Link to this section Summary

Link to this section Functions

Link to this function

child_spec(opts)

Specs

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