RE: Howto add a crontab job ?

2002-11-14 Thread deb
 Hi Chris,

 Thanks. man crontab doesn't tell me what the syntax is for a every 5
 minute
 job though, and that's what I need. Any other ideas ?

 Dee

 -Original Message-
 From: Chris Kenrick [mailto:chriskenrick;yahoo.com.au]
 Sent: Saturday, November 09, 2002 2:39 PM
 To: W.D.McKinney
 Cc: [EMAIL PROTECTED]
 Subject: Re: Howto add a crontab job ?


 On Sat, Nov 09, 2002 at 02:18:45PM -0900, W.D.McKinney wrote:

 I am new to debian and wondered what's the best way to add a
 job for crontab (indexmaker for mrtg) ?

 Write a short shell script to do what you need, looking something like

 #!/bin/sh
 mrtg dosomething

 and put the file in /etc/cron.daily (presuming you want it run once a
 day).

 Or, if you want it at a certain time, or whatever, use man crontab to
 see the file format, and edit /etc/crontab

 HTH

 - Chris
 __
 Do you Yahoo!?
 U2 on LAUNCH - Exclusive greatest hits videos
 http://launch.yahoo.com/u2


 --
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact
 [EMAIL PROTECTED]


Do a man on crontab




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




RE: Howto add a crontab job ?

2002-11-14 Thread Rob VanFleet
On Thu, 2002-11-14 at 07:26, [EMAIL PROTECTED] wrote:
  Hi Chris,
 
  Thanks. man crontab doesn't tell me what the syntax is for a every 5
  minute
  job though, and that's what I need. Any other ideas ?
[...]
 Do a man on crontab

I'm coming in late on this thread, so apologies if this has already been
suggested.

Specifically, to get the proper syntax, you need to 'man 5 crontab'. 
For an every 5 minute job, the first thing that comes to mind is this:

00,05,10,15,20,25,30,35,40,45,50,55 * * * * some command or script

This *might* also work:

*/5 * * * * command

I haven't tested either of these, so no promises. :)

Rob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-14 Thread Shyamal Prasad
Rob == Rob VanFleet [EMAIL PROTECTED] writes:


Rob This *might* also work:

Rob */5 * * * * command

The /n syntax does work with the default cron installed on Debian 3.0
(Vixie cron is what I think it is called). It is documented in
crontab(5).

Cheers!
Shyamal


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-14 Thread Mike Dresser
On 14 Nov 2002, Shyamal Prasad wrote:

 Rob This *might* also work:

 Rob */5 * * * * command

 The /n syntax does work with the default cron installed on Debian 3.0
 (Vixie cron is what I think it is called). It is documented in
 crontab(5).

Odd, works just fine here on over 20 machines.  Are you using the package
cron or something else?

In fact, the /n syntax is documented to WORK with the default cron

 Steps  are also
   permitted after an asterisk, so if you want to say ``every
   two hours'', just use ``*/2''.

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-14 Thread Colin Watson
On Thu, Nov 14, 2002 at 09:55:56AM -0500, Mike Dresser wrote:
 On 14 Nov 2002, Shyamal Prasad wrote:
  The /n syntax does work with the default cron installed on Debian 3.0
  ^
  (Vixie cron is what I think it is called). It is documented in
  crontab(5).
 
 Odd, works just fine here on over 20 machines.  Are you using the package
 cron or something else?
 
 In fact, the /n syntax is documented to WORK with the default cron

It looks like you are in vehement agreement. :-)

-- 
Colin Watson  [[EMAIL PROTECTED]]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-14 Thread Mike Dresser
On Thu, 14 Nov 2002, Colin Watson wrote:

 On Thu, Nov 14, 2002 at 09:55:56AM -0500, Mike Dresser wrote:
  On 14 Nov 2002, Shyamal Prasad wrote:
   The /n syntax does work with the default cron installed on Debian 3.0
   ^
   (Vixie cron is what I think it is called). It is documented in
   crontab(5).
 
  Odd, works just fine here on over 20 machines.  Are you using the package
  cron or something else?
 
  In fact, the /n syntax is documented to WORK with the default cron

 It looks like you are in vehement agreement. :-)

WHERE IS MY MORNING COFFEE?

*runs off to see if someone made a new pot today*

I still haven't figured out why we have coffee in the morning, and then
someone puts tea in coffee maker in the afternoon.

Either way, they both need the same pouring of sugar from the box.

I'll go off and go work on something unimportant, like the backup server
I'm trying to figure out why the tape drive reports only wrote 0 of 10240
bytes on :D

Mike


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-11 Thread bob parker
On Sun, 10 Nov 2002 11:31, W.D.McKinney wrote:
 Hi Chris,

 Thanks. man crontab doesn't tell me what the syntax is for a every 5
 minute
 job though, and that's what I need. Any other ideas ?


Here's an excerpt from my crontab

# run every 5 minutes
*/5 * * * * /home/bob/bin/getmail

HTH
Bob


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-11 Thread Richard Kimber
On Mon, 11 Nov 2002 04:43:22 +1100
bob parker [EMAIL PROTECTED] wrote:

 Here's an excerpt from my crontab
 
 # run every 5 minutes
 */5 * * * * /home/bob/bin/getmail

Don't you have to have the user in here?  My crontab says:-

# m h dom mon dow user  command
25 6* * *   roottest -e /usr/sbin/anacron || run-parts --report
/etc/cron.daily

- Richard.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-11 Thread Colin Watson
On Mon, Nov 11, 2002 at 12:52:53PM +, Richard Kimber wrote:
 On Mon, 11 Nov 2002 04:43:22 +1100
 bob parker [EMAIL PROTECTED] wrote:
  Here's an excerpt from my crontab
  
  # run every 5 minutes
  */5 * * * * /home/bob/bin/getmail
 
 Don't you have to have the user in here?

Not unless you're /etc/crontab. See 'man 5 crontab':

   The format of a cron command is very much the V7 standard, with
   a  number  of upward-compatible extensions.  Each line has five
   time and date fields, followed by a command, followed by a new-
   line  character  ('0).   The system crontab (/etc/crontab) uses
   the same format, except that the username for  the  command  is
   specified  after  the  time and date fields and before the com-
   mand.

-- 
Colin Watson  [[EMAIL PROTECTED]]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-10 Thread ajlewis2
In linux.debian.user, you wrote:
 
 I use crontab -e to edit my personal crontab.  The format that you are 
 looking for is:
 
 
 * * * * * command \n
 
 The first star is the minutes:  every 5 minutes would be 0-59/5 or 
 0,5,10,15,20,25,30,35,40,45,50,55
 
 The second star is the hours:  every hour is *
 
 The third star is day of the month
 
 The fourth star is month of the year
 
 The fifth star is day of the week: Sunday is both 0 and 7.
 
 The \n means that every line must end with a new line.
 
 So every five minutes is something like:
 
 0-55/5 * * * * command \n

I have put this in using crontab -e so that all the info is there when I do
my next edit:

#minute (0-59)
#|  hour (0-23)
#|  |   day of the month (1-31)
#|  |   |   month of the year (1-12)
#|  |   |   |   day of the week (0-6 with 0=Sunday)
#|  |   |   |   |   commands

It is at the top and then my cron jobs are lined up under it.

-- 
Anita
GnuPG key: 1024D/9EDAC910


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




RE: Howto add a crontab job ?

2002-11-10 Thread Joyce, Matthew

 on Sun, Nov 10, 2002, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
  In linux.debian.user, you wrote:
   
   I use crontab -e to edit my personal crontab.  The format 
 that you 
   are
   looking for is:
   
   
   * * * * * command \n
   
   The first star is the minutes:  every 5 minutes would be 0-59/5 or
   0,5,10,15,20,25,30,35,40,45,50,55
 
 ...
 
  I have put this in using crontab -e so that all the info is 
 there when 
  I do my next edit:
  
  #minute (0-59)
  #|  hour (0-23)
  #|  |   day of the month (1-31)
  #|  |   |   month of the year (1-12)
  #|  |   |   |   day of the week (0-6 with 0=Sunday)
  #|  |   |   |   |   commands
  
  It is at the top and then my cron jobs are lined up under it.
 
 I've long done similarly.  Good practice.
 

Isn't there a 'user' option before the 'command' ?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-10 Thread Bob Proulx
Joyce, Matthew [EMAIL PROTECTED] [2002-11-11 10:47:51 +1100]:
   I have put this in using crontab -e so that all the info is there when 
   I do my next edit:
   #minute (0-59)
   #|hour (0-23)
   #||   day of the month (1-31)
   #||   |   month of the year (1-12)
   #||   |   |   day of the week (0-6 with 0=Sunday)
   It is at the top and then my cron jobs are lined up under it.

  I've long done similarly.  Good practice.

Me too.

 Isn't there a 'user' option before the 'command' ?

In system level /etc/crontab and /etc/cron.d/* files yes, but not in
user level 'crontab -e' files no.  If you got to it with 'crontab -e'
as above then no.  The user is you.  Only the root user on the machine
has the option to run a crontab as another user.  And for that you
have to edit files elsewhere.

Bob



msg12229/pgp0.pgp
Description: PGP signature


Re: Howto add a crontab job ?

2002-11-10 Thread Karsten M. Self
on Sun, Nov 10, 2002, Cameron Hutchison ([EMAIL PROTECTED]) wrote:
 Once upon a time W.D.McKinney said...
  Hi Chris,
  
  Thanks. man crontab doesn't tell me what the syntax is for a every 5
  minute
  job though, and that's what I need. Any other ideas ?
 
 man 5 crontab
 
 This will tell you about the crontab file format.
 
 man crontab

The GNU/Linux manual is divided into sections.  'man man' lists these:
   
1   Executable programs or shell commands
2   System calls (functions provided by the kernel)
3   Library calls (functions within system libraries)
4   Special files (usually found in /dev)
5   File formats and conventions eg /etc/passwd
6   Games
7   Macro packages and conventions eg man(7), groff(7).
8   System administration commands (usually only for root)
9   Kernel routines [Non standard]

Note that file formats are in section 5.  You'll also find a reference
to section crontab(5) at the end of crontab(1).

To see a page for a particular section:

   $ man section page

E.g.: 

   $ man 5 crontab

Peace.

-- 
Karsten M. Self [EMAIL PROTECTED]http://kmself.home.netcom.com/
 What Part of Gestalt don't you understand?
 TWikIWeThey: An experiment in collective intelligence.  Stupidity.  Whatever.
   http://twiki.iwethey.org/



msg12255/pgp0.pgp
Description: PGP signature


Re: Howto add a crontab job ?

2002-11-10 Thread Karsten M. Self
on Sun, Nov 10, 2002, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
 In linux.debian.user, you wrote:
  
  I use crontab -e to edit my personal crontab.  The format that you are 
  looking for is:
  
  
  * * * * * command \n
  
  The first star is the minutes:  every 5 minutes would be 0-59/5 or 
  0,5,10,15,20,25,30,35,40,45,50,55

...

 I have put this in using crontab -e so that all the info is there when I do
 my next edit:
 
 #minute (0-59)
 #|hour (0-23)
 #||   day of the month (1-31)
 #||   |   month of the year (1-12)
 #||   |   |   day of the week (0-6 with 0=Sunday)
 #||   |   |   |   commands
 
 It is at the top and then my cron jobs are lined up under it.

I've long done similarly.  Good practice.

Peace

-- 
Karsten M. Self [EMAIL PROTECTED]http://kmself.home.netcom.com/
 What Part of Gestalt don't you understand?
 TWikIWeThey: An experiment in collective intelligence.  Stupidity.  Whatever.
   http://twiki.iwethey.org/



msg12271/pgp0.pgp
Description: PGP signature


Re: Howto add a crontab job ?

2002-11-09 Thread Chris Kenrick
On Sat, Nov 09, 2002 at 02:18:45PM -0900, W.D.McKinney wrote:
 
 I am new to debian and wondered what's the best way to add a 
 job for crontab (indexmaker for mrtg) ?

Write a short shell script to do what you need, looking something like

#!/bin/sh
mrtg dosomething

and put the file in /etc/cron.daily (presuming you want it run once a
day).

Or, if you want it at a certain time, or whatever, use man crontab to
see the file format, and edit /etc/crontab

HTH

- Chris
__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




RE: Howto add a crontab job ?

2002-11-09 Thread W.D.McKinney
Hi Chris,

Thanks. man crontab doesn't tell me what the syntax is for a every 5
minute
job though, and that's what I need. Any other ideas ?

Dee

-Original Message-
From: Chris Kenrick [mailto:chriskenrick;yahoo.com.au]
Sent: Saturday, November 09, 2002 2:39 PM
To: W.D.McKinney
Cc: [EMAIL PROTECTED]
Subject: Re: Howto add a crontab job ?


On Sat, Nov 09, 2002 at 02:18:45PM -0900, W.D.McKinney wrote:

 I am new to debian and wondered what's the best way to add a
 job for crontab (indexmaker for mrtg) ?

Write a short shell script to do what you need, looking something like

#!/bin/sh
mrtg dosomething

and put the file in /etc/cron.daily (presuming you want it run once a
day).

Or, if you want it at a certain time, or whatever, use man crontab to
see the file format, and edit /etc/crontab

HTH

- Chris
__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-09 Thread Cameron Hutchison
Once upon a time W.D.McKinney said...
 Hi Chris,
 
 Thanks. man crontab doesn't tell me what the syntax is for a every 5
 minute
 job though, and that's what I need. Any other ideas ?

man 5 crontab

This will tell you about the crontab file format.

man crontab

This tells you about the crontab command.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




RE: Howto add a crontab job ?

2002-11-09 Thread W.D.McKinney
Thanks Cameron, the medicine I needed.

-Original Message-
From: Cameron Hutchison [mailto:camh+dl;xdna.net]
Sent: Saturday, November 09, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: Re: Howto add a crontab job ?


Once upon a time W.D.McKinney said...
 Hi Chris,
 
 Thanks. man crontab doesn't tell me what the syntax is for a every 5
 minute
 job though, and that's what I need. Any other ideas ?

man 5 crontab

This will tell you about the crontab file format.

man crontab

This tells you about the crontab command.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Howto add a crontab job ?

2002-11-09 Thread Travis Crump
W.D.McKinney wrote:

Hi Chris,

Thanks. man crontab doesn't tell me what the syntax is for a every 5
minute
job though, and that's what I need. Any other ideas ?

Dee



I use crontab -e to edit my personal crontab.  The format that you are 
looking for is:


* * * * * command \n

The first star is the minutes:  every 5 minutes would be 0-59/5 or 
0,5,10,15,20,25,30,35,40,45,50,55

The second star is the hours:  every hour is *

The third star is day of the month

The fourth star is month of the year

The fifth star is day of the week: Sunday is both 0 and 7.

The \n means that every line must end with a new line.

So every five minutes is something like:

0-55/5 * * * * command \n


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]