Cronex v0.4.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(pid, 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(table_pid, job)
:ok
get_jobs(pid)

Returns a map of the jobs on the cronex table.

Example

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