cron.h
来自「这是一个我自己仿照linux下cron程序写的精简版的cron」· C头文件 代码 · 共 44 行
H
44 行
#include <signal.h>#include <sys/time.h>#include <time.h>#include <sys/types.h>#include <fcntl.h>#include <sys/stat.h>#define SECONDS_PER_MINUTE 60#define MINUTE_RANGE 60#define HOUR_RANGE 24#define DAY_OF_MOU_RANGE 24#define MONTH_OF_YEAR_RANGE 31#define DAY_OF_WEEK_RANGE 31#define MAX_FNAME 100#define SPOOL_DIR getenv("HOME")#define CRON_TAB(u) "%s/%s", SPOOL_DIR, u#define MAX_LINE 500#define MARK(number,n) (number = (((long int)1 << n) | number))#define SET(number) (number = -1)#define CHECK(number,n) ((number >> n) & 1)//typedef struct date_rec_ {// int minute_rec[MINUTE_RANGE];// int hour_rec[HOUR_RANGE];// int day_of_mon_rec[DAY_OF_MOU_RANGE];// int mon_of_year_rec[MONTH_OF_YEAR_RANGE];// int day_of_week_rec[MONTH_OF_YEAR_RANGE];// char command[MAX_LINE];// struct date_rec_ *next;//} date_rec;typedef struct date_rec_ { long int minute_rec; long int hour_rec; long int day_of_mon_rec; long int mon_of_year_rec; long int day_of_week_rec; char command[MAX_LINE]; struct date_rec_ *next;} date_rec;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?