diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-07-15 19:13:30 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-07-15 19:13:30 +0000 |
commit | ebcbb2b2d2b68ee6347b5018b9212bbe5fccd946 (patch) | |
tree | e71531558e9d84cf8ad053a7652ab38b58160e8d /usr.sbin/cron/structs.h | |
parent | 55ae52781373a832341554a38aebe998ada66dcc (diff) |
Move atrun(8) functionality into cron(8) proper. This fixes the
long-standing annoyance that atrun's granularity is 10 minutes.
Most at jobs run with a 1 minute granularity. Jobs submitted via
"at now" or "batch" will run immediately. Includes a rewritten
cron(8) man page. at(1) will be integrated more closely into
cron at a future date.
Upgrading notes:
the atrun job in root's crontab should be removed.
the /var/at/spool directory is no longer used
Diffstat (limited to 'usr.sbin/cron/structs.h')
-rw-r--r-- | usr.sbin/cron/structs.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/usr.sbin/cron/structs.h b/usr.sbin/cron/structs.h index a0920f7249e..e3602ab4830 100644 --- a/usr.sbin/cron/structs.h +++ b/usr.sbin/cron/structs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: structs.h,v 1.3 2002/07/08 18:11:02 millert Exp $ */ +/* $OpenBSD: structs.h,v 1.4 2002/07/15 19:13:29 millert Exp $ */ /* * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. @@ -19,8 +19,7 @@ typedef struct _entry { struct _entry *next; - uid_t uid; - gid_t gid; + struct passwd *pwd; char **envp; char *cmd; bitstr_t bit_decl(minute, MINUTE_COUNT); @@ -55,6 +54,19 @@ typedef struct _cron_db { user *head, *tail; /* links */ time_t mtime; /* last modtime on spooldir */ } cron_db; + +typedef struct _atjob { + struct _atjob *next, *prev; /* links */ + uid_t uid; /* uid of the job */ + gid_t gid; /* gid of the job */ + int queue; /* name of the at queue */ + time_t run_time; /* time to run at job */ +} atjob; + +typedef struct _at_db { + atjob *head, *tail; /* links */ + time_t mtime; /* last modtime on spooldir */ +} at_db; /* in the C tradition, we only create * variables for the main program, just * extern them elsewhere. |