Fix README documentation for arguments

This commit is contained in:
Zach Goldberg 2015-02-11 14:26:35 -08:00
parent aecd0e7deb
commit 566b78849e

View File

@ -31,8 +31,16 @@ Each task is described with five elements:
* Time is an integer. * Time is an integer.
* Units indicates the time unit you use. It can be: seconds, minutes, hours, days. * Units indicates the time unit you use. It can be: seconds, minutes, hours, days.
* Module and * Function are the exact call you want to schedule. * Module and * Function are the exact call you want to schedule.
* Arguments is an erlang list of arguments inside the characters "> ." * Arguments is an array. Strings will be converted to binaries.
* timer_type is one of 'fixed' or 'interval'. Fixed timers occur at a fixed time
after the [minute|hour|day] e.g. every hour on the 5th minute (1:05PM, 2:05PM etc)
interval timers occur every interval (starting on an even unit) e.g. every 10 minutes
starting at 1PM, 1:10PM, 1:20PM etc.
Fixed timers are the equivalent of unix cron's comma syntax e.g. "2 * * *" and interval
timers are the / syntax e.g. "*/5 * * *".
Default timer_type is interval.
EXAMPLE TASKS EXAMPLE TASKS
============= =============
@ -45,12 +53,17 @@ modules:
units: hours units: hours
module: mnesia module: mnesia
function: info function: info
arguments: "> []." arguments: {}
timer_type: fixed
- time: 10 - time: 10
units: seconds units: seconds
module: ejabberd_auth module: ejabberd_auth
function: try_register function: try_register
arguments: "> [\"user1\", \"localhost\", \"somepass\"]." arguments:
- "user1"
- "localhost"
- "somepass"
timer_type: interval
EJABBERD COMMANDS EJABBERD COMMANDS