libamxp
1.4.0
Patterns C Implementation
|
Ambiorix cron expression parser. More...
#include <stdbool.h>
#include <stdint.h>
#include <amxc/amxc_timestamp.h>
Go to the source code of this file.
Data Structures | |
struct | _cron_expr |
Structure containing parsed cron expression. More... | |
Typedefs | |
typedef struct _cron_expr | amxp_cron_expr_t |
Structure containing parsed cron expression. More... | |
Functions | |
int | amxp_cron_new (amxp_cron_expr_t **cron_expr) |
Allocates an amxp_cron_expr_t structures and initializes it to every second. More... | |
void | amxp_cron_delete (amxp_cron_expr_t **cron_expr) |
Frees the previously allocated amxp_cron_expr_t structure. More... | |
int | amxp_cron_init (amxp_cron_expr_t *cron_expr) |
Initializes an amxp_cron_expr_t structures to every second. More... | |
void | amxp_cron_clean (amxp_cron_expr_t *cron_expr) |
Resets the amxp_cron_expr_t structure to the initialized state. More... | |
int | amxp_cron_parse_expr (amxp_cron_expr_t *target, const char *expression, const char **error) |
Allocates and initializes an amxp_cron_expr_t structures and parses the given cron expression. More... | |
int | amxp_cron_build_weekly (amxp_cron_expr_t *target, const char *time, const char *days_of_week) |
Builds a weekly cron expression that is triggered at a certain time on certain days of the week. More... | |
int | amxp_cron_prev (const amxp_cron_expr_t *expr, const amxc_ts_t *ref, amxc_ts_t *next) |
Calculates the previous trigger time for a parsed cron expression. More... | |
int | amxp_cron_next (const amxp_cron_expr_t *expr, const amxc_ts_t *ref, amxc_ts_t *next) |
Calculates the next trigger time for a parsed cron expression. More... | |
int64_t | amxp_cron_time_until_next (const amxp_cron_expr_t *expr, bool local) |
Calculates the time in seconds until next trigger of a parsed cron expression occurs. More... | |
Ambiorix cron expression parser.
Definition in file amxp_cron.h.