LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-18-2003, 11:32 AM   #1
ALF
Member
 
Registered: Oct 2002
Posts: 32

Rep: Reputation: 15
crontab


Hi,

I edited crontab and tested it to make sure it is doing exactly what I want. Then I logged off.

The next day I found out that the crontab didn't run at night as it should, but after I logged on crontab started to work !

Do I need to keep my user logged on all the time to let crontab run, or am I missing something?

Alf
 
Old 12-18-2003, 11:38 AM   #2
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
No, that's the whole point of crontab.

What is the crontab entry for your job?

John
 
Old 12-18-2003, 11:49 AM   #3
ALF
Member
 
Registered: Oct 2002
Posts: 32

Original Poster
Rep: Reputation: 15
crontab

it is very simple - just to get disk free info into a history file :


$ crontab -l

0 6-7 * * 1-5 echo ============== >> /home/alf/df_history.txt
0,30 8-18 * * 1-5 /home/alf/df_history


So, when I checked the file, it missed the two lines (in the echo ===== command) and the df_history script at 8 (as I logged on at about 8:05).

Alf
 
Old 12-18-2003, 12:05 PM   #4
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
From this, I would expect to see two "===================" lines in df_history.txt (assuming the file was empty the previous evening).

You haven't redirected the output of df_history to the txt file. Is that coded in the script itself? Did you use an absolute pathname?

John
 
Old 12-18-2003, 12:10 PM   #5
ALF
Member
 
Registered: Oct 2002
Posts: 32

Original Poster
Rep: Reputation: 15
Yes, actually it is working now without any problem. (it dumps every 30 minutes output of df -k to the history file with date stamp).

I guess I'll try to log off now for while and see if it stopped during that period or not.

Alf
 
  


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 Off
HTML code is Off



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration