Rev | Line | |
---|
[1] | 1 | #ifndef SH_SCHEDULE_H
|
---|
| 2 | #define SH_SCHEDULE_H
|
---|
| 3 |
|
---|
| 4 | /************************************************
|
---|
| 5 | *
|
---|
| 6 | * Scheduler class - public definitions
|
---|
| 7 | *
|
---|
| 8 | ************************************************/
|
---|
| 9 |
|
---|
| 10 | typedef struct sh_schedule_ {
|
---|
| 11 | int max[5];
|
---|
| 12 | int min[5];
|
---|
| 13 | int step[5];
|
---|
| 14 | int min_step;
|
---|
| 15 | time_t last_exec;
|
---|
| 16 | int first;
|
---|
| 17 | struct sh_schedule_ * next;
|
---|
| 18 | } sh_schedule_t;
|
---|
| 19 |
|
---|
| 20 | /* This function parses a crontab-like schedule and fills a
|
---|
| 21 | * sh_schedule_t structure provided by the caller.
|
---|
| 22 | */
|
---|
| 23 | int create_sched (const char * ssched, sh_schedule_t * isched);
|
---|
| 24 |
|
---|
| 25 | /* This function returns 1 if the scheduled event should be executed,
|
---|
| 26 | * else 0
|
---|
| 27 | */
|
---|
| 28 | int test_sched (sh_schedule_t * isched);
|
---|
| 29 |
|
---|
| 30 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.