LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   crontab (https://www.linuxquestions.org/questions/linux-general-1/crontab-57550/)

alaios 04-30-2003 08:24 PM

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?

Tinkster 04-30-2003 08:38 PM

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

alaios 05-01-2003 02:34 AM

oups
 
I cant see anything thats why

MasterC 05-01-2003 08:14 AM

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

alaios 05-01-2003 02:52 PM

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?

Tinkster 05-01-2003 03:26 PM

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

Cheers,
Tink


All times are GMT -5. The time now is 01:53 PM.