]> granicus.if.org Git - fcron/blob - database.h
don't include debug files in tar
[fcron] / database.h
1 /*
2  * FCRON - periodic command scheduler 
3  *
4  *  Copyright 2000-2014 Thibault Godouet <fcron@free.fr>
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  * 
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  * 
20  *  The GNU General Public License can also be found in the file
21  *  `LICENSE' that comes with the fcron source distribution.
22  */
23
24
25 #ifndef __DATABASE_H__
26 #define __DATABASE_H__
27
28 /* functions prototypes */
29 extern void test_jobs(void);
30 extern void wait_chld(void);
31 extern void wait_all(int *counter);
32 extern time_t time_to_sleep(time_t lim);
33 extern time_t check_lavg(time_t lim);
34 extern void set_next_exe(struct cl_t *line, char option, int info_fd);
35 #define NO_GOTO 1               /* set_next_exe() : no goto_non_matching() */
36 #define NO_GOTO_LOG 2           /* set_next_exe() : NO_GOTO but also log nextexe time */
37 #define FROM_CUR_NEXTEXE 4      /* set_next_exe() : compute from nextexe, not now */
38 extern void set_next_exe_notrun(struct cl_t *line, char context);
39 #define LAVG 1                  /* set_next_exe_notrun() : context */
40 #define SYSDOWN 2               /* set_next_exe_notrun() : context */
41 #define QUEUE_FULL 3            /* set_next_exe_notrun() : context */
42 #define SYSDOWN_RUNATREBOOT 4   /* set_next_exe_notrun() : context */
43 extern void mail_notrun(struct cl_t *line, char context, struct tm *since);
44 extern void mail_notrun_time_t(cl_t * line, char context, time_t since_time_t);
45 extern job_t *job_queue_remove(cl_t * line);
46 extern void insert_nextexe(struct cl_t *line);
47 extern void run_normal_job(cl_t * line, int fd);
48 extern void add_serial_job(struct cl_t *line, int fd);
49 extern void add_lavg_job(struct cl_t *line, int fd);
50 extern void run_serial_job(void);
51 extern int switch_timezone(const char *orig_tz, const char *dest_tz);
52 extern void switch_back_timezone(const char *orig_tz);
53
54 #endif                          /* __DATABASE_H__ */