Linux Newbie help
 help / color / mirror / Atom feed
From: Chuck Gelm <nc8q@gelm.net>
To: Ray Olszewski <ray@comarre.com>
Cc: linux-newbie@vger.kernel.org
Subject: Re: crontab syntax ?
Date: Sat, 07 Jun 2003 18:23:21 -0400	[thread overview]
Message-ID: <3EE265D9.56EA90D0@gelm.net> (raw)
In-Reply-To: 5.1.0.14.1.20030607131805.01fe8a60@celine

Thanks, Ray:

Odd, here is a segment of (*my*) 'man crontab' showing
the example lines. Every example has 'date' as the 6th field. :-|
(*my* = slackware-8.0, kernel-2.2.19, firewall, ip-masq)
Maybe the examples show how to run the 'date' program?

# 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

Ray Olszewski wrote:
> 
> At 03:50 PM 6/7/2003 -0400, Chuck Gelm wrote:
> >Howdy, y'all:
> >
> >  I want to run a script monthly.
> >(update my dynamic DNS account)
> >I (as 'root') ran 'crontab -e' and added this line:
> >
> >5 6 7 * date /usr/local/src/ez/dyndns.conf >> /share/dyndnsup.txt 2>>
> >/share/dyndnsup.txt
> >
> >This seems to be the syntax indicated by 'man crontab'.
> >If I understand the syntax of crontab, the above line will
> >every 7th of the month, at 06:05, execute my dyndns.conf file
> >and send standard and error messages to file /share/dyndnsup.txt.
> >
> >  Is this correct syntax?
> 
> Probably. I'm not familiar with the use of "date" as the fifth field (for
> day of the week), and I can't find it listed as an option in my man page,
> so I am not sure about that piece. I would write this entry ...
> 
> 5 6 7 *  *      /usr/local/src/ez/dyndns.conf >> /share/dyndnsup.txt 2>>
> /share/dyndnsup.txt.
> 
> ... with the last * indicating any day of the week.
> 
> >  Is there a syntax checker for crontab like testparm for samba?
> 
> crontab itself will inform you if any of the 5 time fields has an invalid
> entry, whenever you exit your editor (and it displays the "installing new
> crontab" message). crontab has no way fo knowing if the entry for what to
> run is valid or not.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2003-06-07 22:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-29 20:54 Slackware 8.1.01 Install???? Hal MacArgle
2003-05-29 21:07 ` pa3gcu
2003-05-29 23:04   ` James Miller
2003-05-30  0:20     ` Chuck Gelm
2003-05-30 20:57     ` Hal MacArgle
2003-05-29 21:37 ` Chuck Gelm
2003-06-03 22:23 ` Chuck Gelm
     [not found] ` <200305312214.21667.pa3gcu@zeelandnet.nl>
     [not found]   ` <20030603164428.A161@lnx2.w8mch.ampr.org>
2003-06-04 19:01     ` pa3gcu
2003-06-05 13:30       ` Hal MacArgle
2003-06-05 19:08         ` pa3gcu
2003-06-07 14:47           ` Hal MacArgle
2003-06-07 15:20             ` Amin
2003-06-07 18:21               ` AOL and MS Hal MacArgle
2003-06-07 19:50             ` crontab syntax ? Chuck Gelm
2003-06-07 20:27               ` Ray Olszewski
2003-06-07 22:23                 ` Chuck Gelm [this message]
2003-06-07 23:09                   ` Ray Olszewski
2003-06-07 23:09                   ` jdr
2003-06-08  8:36             ` Slackware 8.1.01 Install???? pa3gcu
2003-06-09  9:59               ` Chuck Gelm
2003-06-09 12:49                 ` pa3gcu
2003-06-10  0:58                   ` Chuck Gelm
2003-06-10 19:11                     ` pa3gcu
2003-06-10  1:32                   ` Chuck Gelm
2003-06-10 19:14                     ` pa3gcu
     [not found]                 ` <3EE614A6.1CBE57ED@actrix.co.nz>
2003-06-10 10:01                   ` Chuck Gelm
2003-06-10 13:54                     ` Hal MacArgle
2003-06-10 19:29                       ` pa3gcu
     [not found]                       ` <3EE6DFD8.AB192E4@actrix.co.nz>
2003-06-11 15:43                         ` Hal MacArgle
2003-06-10 15:34               ` Hal MacArgle
2003-06-10 19:52                 ` pa3gcu
2003-06-11 15:51                   ` Hal MacArgle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EE265D9.56EA90D0@gelm.net \
    --to=nc8q@gelm.net \
    --cc=linux-newbie@vger.kernel.org \
    --cc=ray@comarre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox