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. |
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.... |
All times are GMT -5. The time now is 10:28 PM. |