Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

alarm.c File Reference

#include "monitor.h"
#include <ctype.h>

Functions

int32_t aw_set_sched_calendar (aw_alarm_sched_cal_t *cal, const byte_t *crontab, FILE *message_stream)
 Set a calendar component in a sched object.


Function Documentation

int32_t aw_set_sched_calendar (  aw_alarm_sched_cal_t *  cal,
const byte_t *  crontab,
FILE *  message_stream
) 
 

Set a calendar component in a sched object.

aw_set_sched_calendar

Crontab is expected as a space delimited string with 5 fields:

field allowed values ----- -------------- minute 0-59 hour 0-23 day of month 1-31 month 1-12 day of week 0-6

A field may be an asterisk (*), which always stands for ``first-last''.

Ranges of numbers are allowed. Ranges are two numbers separated with a hyphen. The specified range is inclusive. For example, 8-11 for an ``hours'' entry specifies execution at hours 8, 9, 10 and 11.

Lists are allowed. A list is a set of numbers (or ranges) separated by commas. Examples: ``1,2,5,9'', ``0-4,8-12''.

Parameters:
cal Calendar to set
crontab String in crontab format
message_stream FILE ptr for errors
Returns:
Returns non-zero on error

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)