Actually, the crontab man page DOES give a bunch of syntax examples --
more than most man pages in fact. From the crontab man page:
The crontab format is roughly similar to that used by vix-
iecron, but without complex features. Individual fields
may contain a time, a time range, a time range with a skip
factor, a symbolic range for the day of week and month in
year, and additional subranges delimited with commas.
Blank lines in the crontab or lines that begin with a hash
(#) are ignored. If you specify both a day in the month
and a day of week, the result is effectively ORd... the
crontab entry will be run on the specified day of week and
on the specified day in the month.
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# at 6:10 a.m. every day
10 6 * * * date
# every two hours at the top of the hour
0 */2 * * * date
# every two hours from 11p.m. to 7a.m., and at 8a.m.
0 23-7/2,8 * * * date
# at 11:00 a.m. on the 4th and on every mon, tue, wed
0 11 4 * mon-wed date
# 4:00 a.m. on january 1st
0 4 1 jan * date
# once an hour, all output appended to log file
0 4 1 jan * date >>/var/log/messages 2>&1
The command portion of the line is run with /bin/sh -c
<command> and may therefore contain any valid bourne shell
command. A common practice is to run your command with
exec to keep the process table uncluttered. It is also
common to redirect output to a log file. If you do not,
and the command generates output on stdout or stderr, the
result will be mailed to the user in question. If you use
this mechanism for special users, such as UUCP, you may
want to create an alias for the user to direct the mail to
someone else, such as root or postmaster.
~Jay
On Sat, 17 Apr 1999, Marc-Oliver Kalis wrote:
} Jay wrote:
} >
} > Try 'man crontab' -- it is very informative.
} >
} > ~Jay
} >
} > On Sat, 17 Apr 1999, Marc-Oliver Kalis wrote:
} >
} > } hi there,
} > } as some of you already know, i am still very new to Linux.
} > } i have a perl scrip, that i want to implement for a cron job, but i have
} > } never used cron before. it is supposed to run hourly so i suppose i need
} > } to put that script into /etc/cron.hourly/
} > } i did that but now i need to know how i can activate it, that cron runs
} > } this script avery hour.
} > } i tried the man pages but they were very scarce.
} > } thnx for your help
} > }
} > } marco
} > }
} >
} > - J a y J a c o b s o n
} > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
} > - President / CEO Wired Global Communications, Inc.
} > - [EMAIL PROTECTED] http://www.wiredglobal.com
}
} sorry, i should have specified my question:
} what my actusal problem is, that i don't have a clue about the syntax in
} the crontabs, and even in the man pages of the crontabs, it doesn't say
} anything about the syntax in there. it just gives a few options for
} running thre crnontabs command.
} is there somplace i can get some info about the syntax of the crontabs?
} i amsure it can't be that complicated. maybe someone can give a brief
} overview or maybe even send me a cron how to since i didn't manage to
} find it.
}
} thnx
}
} marco
}
- J a y J a c o b s o n
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- President / CEO Wired Global Communications, Inc.
- [EMAIL PROTECTED] http://www.wiredglobal.com