Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-12-2008, 11:40 AM   #1
LQ Newbie
Registered: Mar 2008
Posts: 7

Rep: Reputation: 0
deleting a task from crontab list.

Dear all,

I have a file "c" that has all the task that are scheduled.
for ex the content of c file is

10 4 2 30 * sh
11 20 2 7 * sh
19 22 9 11 * sh

now i need to delete only second task.If i use crontab -r it deletes all tasks.and if i remove that from the file c ,then also after running crontab -l ,i am getting all 3 tasks schedule.

Can anyone guide me to solve this issue.

With regards,
Old 06-12-2008, 11:58 AM   #2
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
do you have a reference to the file C in your crontab that executes file C? If so I dont see why you can't just remove the lines from file C, if thats the case there is no need to do anything with crontab.

crontab -l
00 11 11 06 * /path/to/file/c

ls C

10 4 2 30 * sh
11 20 2 7 * sh
19 22 9 11 * sh

Now that I think about it.. If that IS the content of file C why do you have crontab date structure?

If this is in your crontab

10 4 2 30 * sh
11 20 2 7 * sh
19 22 9 11 * sh

then just do a
crontab -e

dd on the line you want to remove and save the crontab, edit it just like you would any vi file..

Or am I completely misreading your post....


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
Bash scripting, deleting an entry from a list Dee-ehn Linux - Software 2 04-06-2007 07:15 AM
karamba: to do list / task list efm Linux - Software 0 07-05-2006 06:24 AM
Seg Fault in GCC when deleting Node from Linked List gren838 Programming 2 12-11-2005 05:21 PM
Task List jgtg32a Mandriva 3 02-15-2005 09:17 AM
maintenance task & check list IamDaniel Linux - General 1 03-02-2003 10:36 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 AM.

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