LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-12-2008, 10:40 AM   #1
jdeeptir
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 run.sh
11 20 2 7 * sh inc.sh
19 22 9 11 * sh inc.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,
Deepti.
 
Old 06-12-2008, 10:58 AM   #2
ncsuapex
Member
 
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.


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


ls C
__________________________________

10 4 2 30 * sh run.sh
11 20 2 7 * sh inc.sh
19 22 9 11 * sh inc.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 run.sh
11 20 2 7 * sh inc.sh
19 22 9 11 * sh inc.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....
 
  


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


All times are GMT -5. The time now is 12:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration