LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
Search this Thread
Old 08-15-2005, 01:04 PM   #1
Xris718
Member
 
Registered: May 2003
Location: NYC
Distribution: CentOS
Posts: 261

Rep: Reputation: 30
crontab


Hi guys

My crontab doesnt work for some reason here is whats in it.

This is just testing purposes but it doesnt remove the "killme" file. So what gives?

30 * * * * rm /home/yuri/perl/killme >/dev/null 2>&1

ls -l killme
-rw-r--r-- 1 yuri users 0 Aug 15 12:38 killme

crond is running
 
Old 08-15-2005, 01:07 PM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
cron doesn't run as "yuri" (the only users allowed to write to that file) so it doesn't have the permission to delete your file.

try to change the ownership of the file to "nobody" or to chmod to 666.
 
Old 08-15-2005, 01:10 PM   #3
Xris718
Member
 
Registered: May 2003
Location: NYC
Distribution: CentOS
Posts: 261

Original Poster
Rep: Reputation: 30
but i edited the crontab entry as yuri not as root. And the file is in my home directory so why cant i delete it?
 
Old 08-15-2005, 01:14 PM   #4
Xris718
Member
 
Registered: May 2003
Location: NYC
Distribution: CentOS
Posts: 261

Original Poster
Rep: Reputation: 30
chmod 666 killme

but still the file exists. crontab doesnt remove it. Any other ideas?
 
Old 08-15-2005, 01:33 PM   #5
Xris718
Member
 
Registered: May 2003
Location: NYC
Distribution: CentOS
Posts: 261

Original Poster
Rep: Reputation: 30
also tried same command as root and doesnt work either.
 
Old 08-15-2005, 02:03 PM   #6
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
look like I was wrong...

my guess would be to change the ">/dev/null 2>&1" for "> /tmp/error" so you would see the error message next time it fails.
 
  


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


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


All times are GMT -5. The time now is 11:13 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration