LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-30-2003, 08:24 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Rep: Reputation: 45
crontab


I am trying to find how crontab works.
As root
crontab -e
i insert this record
* * * * * ls -l





Where i must see ...the result..of the ls -l?
How often this is being extracted? Continuously?
 
Old 04-30-2003, 08:38 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Quote:
Where i must see ...the result..of the ls -l?
Stderr, stdout, mail? :)

Usually you'll redirect the output of a command run by
cron to some logfile ...

Quote:
How often this is being extracted? Continuously?
Every minute :D

Yassou!
Tink
 
Old 05-01-2003, 02:34 AM   #3
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
oups

I cant see anything thats why
 
Old 05-01-2003, 08:14 AM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Well normally you wouldn't, like Tink said, you'll need to direct it somewhere (or you should, by default, receive an email). To direct it:
* * * * * ls -l >/path/to/log/cronlog

Or wherever you'd like.

Then simply view the logfile to see what ls-l is outputing.

Cool
 
Old 05-01-2003, 02:52 PM   #5
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Original Poster
Rep: Reputation: 45
oooo

Lets take it from the beggining
i write
crontab -e
i insert this record:
1 * * * * ls -l > home/alaios/temp

quit the crontab


i wait about 10 min
less /home/alaios/temp and the file is null...why?
 
Old 05-01-2003, 03:26 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,950
Blog Entries: 11

Rep: Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860Reputation: 860
Because it's only going to run
in the first minute of every hour? :)

Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab x2??? killahsmurf Slackware 2 05-24-2005 10:53 PM
Crontab wormraper Debian 4 05-15-2005 01:01 AM
How to use crontab ? Dakkar Linux - Newbie 2 01-22-2004 10:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
HELP!! crontab karleong Linux - General 9 07-12-2003 10:54 AM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration