SchedEx v0.5.2 SchedEx View Source

SchedEx schedules jobs (either an m,f,a or a function) to run in the future. These jobs are run in isolated processes, and are unsurpervised.

Link to this section Summary

Functions

Cancels the given scheduled job

Runs the given function at the given time

Runs the given module, function and argument at the given time

Runs the given function on every occurence of the given crontab. If func is of arity 1, the scheduled execution time will be passed for each invocation

Runs the given module, function and argument on every occurence of the given crontab

Runs the given function in given number of milliseconds

Runs the given module, function and argument in the given number of milliseconds

Link to this section Functions

Cancels the given scheduled job

Runs the given function at the given time

Runs the given module, function and argument at the given time

Link to this function run_every(func, crontab, opts \\ []) View Source

Runs the given function on every occurence of the given crontab. If func is of arity 1, the scheduled execution time will be passed for each invocation

Supports the following options:

timezone: A string timezone identifier (“America/Chicago”) specifying the timezone within which the crontab should be interpreted. If not specified, defaults to “UTC”

time_scale: A module implementing two methods: now/1, which returns the current time in the specified timezone, and speedup/0, which returns an integer factor to speed up delays by. Used mostly for speeding up test runs. If not specified, defaults to an identity module which returns ‘now’, and a factor of 1

Link to this function run_every(m, f, a, crontab, opts \\ []) View Source

Runs the given module, function and argument on every occurence of the given crontab

Supports the following options:

timezone: A string timezone identifier (“America/Chicago”) specifying the timezone within which the crontab should be interpreted. If not specified, defaults to “UTC”

time_scale: A module implementing two methods: now/1, which returns the current time in the specified timezone, and speedup/0, which returns an integer factor to speed up delays by. Used mostly for speeding up test runs. If not specified, defaults to an identity module which returns ‘now’, and a factor of 1

Link to this function run_in(func, delay, opts \\ []) View Source

Runs the given function in given number of milliseconds

Supports the following options:

repeat: Whether or not this job should be recurring

Link to this function run_in(m, f, a, delay, opts \\ []) View Source

Runs the given module, function and argument in the given number of milliseconds

Supports the following options:

repeat: Whether or not this job should be recurring