cron

Luke Davis ldavis at shellworld.net
Tue Jun 17 02:54:25 EDT 2003


Interesting.  Does the end of your contrab(1) manual page, give you a "see
also", to another crontab page?


On Tue, 17 Jun 2003, Joseph C. Lininger wrote:

> Alex,
> This is what I'm running as well. I'll give you a quick run down on how the crontab file works in this version of cron. You can also look this up in the manual by looking at the man page for crond. Don't look for crontab, as this will only give you the crontab program's page. There is no man page in section 5 for crontab for this version.
>
> First, to edit crontab you will need to issue this command:
>
> crontab -e
>
> Make sure you set the VISUAL (notice that it's all caps) environment variable to the path to the text editor you want to use. This is the editor crontab will spawn.
>
> The format of this file consists of several fields. basically, the line looks like this:
>
> <minute> <hour> <day> <month> <days of the week> <command>
>
> For any of these fields, you may use an absolute number, a list seperated by commas, or a * to indicate all values. Also, you can use a skip factor to have cron skip running the job at certin times. I'll show that in the examples below. For the <days of the week> field, you should use 0 for sunday through 6 for saturday. You'll want to direct the output of the command you run to /dev/null or some log file or you'll end up getting the results emailed to you.
>
> Ok, now a couple of examples.
>
> # run a command at 4:30 AM every day
> 30 4 * * * somecommand
> # run a command at 2:30 in the afternoon on the first of the month
> 30 14 1 * * somecommand
> # run a command at midnight every monday and tuesday
> 0 0 * * 1,2 somecommand
> # illistrates the skip factor--run a command every 15 minutes
> */15 * * * * somecommand
>
> Ok, if you have any more questions, let me know.
>




More information about the Speakup mailing list