# Module cloudi_service_cron

- Description
- Function Index
- Function Details

### CloudI Cron Service

Cron expression events are supported within the limitation defined by erlang:system_info(end_time) (events during a 250 year period). The cron expression string may use the 5 required fields (minutes, hours, day_of_month, month, day_of_week), 6 fields with year as the last field, 7 fields with seconds as the first field or a supported macro (@yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly).

.

Copyright © 2019-2021 Michael Truog

Version: 2.0.3 Dec 3 2021 19:11:42 ------------------------------------------------------------------------

Behaviours: `cloudi_service`.

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### CloudI Cron Service

Cron expression events are supported within the limitation defined by erlang:system_info(end_time) (events during a 250 year period). The cron expression string may use the 5 required fields (minutes, hours, day_of_month, month, day_of_week), 6 fields with year as the last field, 7 fields with seconds as the first field or a supported macro (@yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly).

If the system clock is adjusted backwards, the same sequence of events (described by the cron expression) occurs without redoing events that have already occurred before the time change. That means the adjustment backwards only delays the next event's occurrence by the adjustment amount.

If the system clock is adjusted forwards, an event may occur immediately (when the system clock change is detected) due to the event time becoming a time in the past. Each cron expression's next event will be a a time in the future based on the updated current time (events may have been skipped by adjusting the system clock forwards).

## Function Index

cloudi_service_handle_info/3 |
cloudi_service_init/4 |
cloudi_service_terminate/3 |

## Function Details

### cloudi_service_handle_info/3

`cloudi_service_handle_info(Timeout_async_active, State, Dispatcher) -> any()`

### cloudi_service_init/4

`cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()`

### cloudi_service_terminate/3

`cloudi_service_terminate(Reason, Timeout, State) -> any()`

Generated by EDoc