View Source Crontab.CronExpression.Composer (crontab v1.1.13)

Generate from %CronExpression{} to * * * * * *.

Link to this section Summary

Functions

Generate from %Crontab.CronExpression{} to * * * * * *.

Link to this section Functions

Link to this function

compose(cron_expression)

View Source
@spec compose(Crontab.CronExpression.t()) :: binary()

Generate from %Crontab.CronExpression{} to * * * * * *.

examples

Examples

iex> Crontab.CronExpression.Composer.compose %Crontab.CronExpression{}
"* * * * * *"

iex> Crontab.CronExpression.Composer.compose %Crontab.CronExpression{minute: [9, {:-, 4, 6}, {:/, :*, 9}]}
"9,4-6,*/9 * * * * *"

iex> Crontab.CronExpression.Composer.compose %Crontab.CronExpression{reboot: true}
"@reboot"