Cronex v0.1.0 Cronex.Table

This module represents a cron table.

Summary

Functions

Adds a %Cronex.Job{} to the cronex table

Returns a map of the jobs on the cronex table

Functions

add_job(server_id \\ :cronex_table, job)

Adds a %Cronex.Job{} to the cronex table.

Example

iex> task = fn -> IO.puts("Task") end
iex> job = Cronex.Job.new(:day, task) 
iex> Cronex.Table.add_job(job)
:ok
get_jobs(server_id \\ :cronex_table)

Returns a map of the jobs on the cronex table.

Example

iex> Cronex.Table.get_jobs
%{}

iex> Cronex.Table.get_jobs
%{0 => %Cronex.Job{}}
start_link(args, opts \\ [])