Visit Our UNIX and Linux User Community


disable cron job


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers disable cron job
# 1  
Old 10-02-2009
disable cron job

Hi all,

I am not the unix person but have to disable cron job on the server

I typed crontab -l to list the job there is one job
then i tried crontab -e and got one result 100 ( i do not know what that means)

how can i disable the job to run i want to disable the job.

Please show me step to save and exit from the job edit as well.

Thanks
# 2  
Old 10-02-2009
Hi.

What do you mean "one result 100"?

When you typed "crontab -e", what exactly happened?

Which OS, which shell are you using (echo $0).

If you can't be bothered with any of that, cfajohnson has a good suggestion here:

https://www.unix.com/shell-programmin...ab-script.html

Last edited by Scott; 10-02-2009 at 04:57 PM..
# 3  
Old 10-02-2009
on the crontab -e i get 100 there is just one job on the cron list though
# 4  
Old 10-02-2009
Hi.

Type:

Code:
crontab -l | sed '/./ s/^/#/' | crontab -

It will comment out (disable) all cronjobs - as there is only one, it will disable that one. If there's more than one, replace /./ with /_some_string_that_uniquely_identifes_the_job_I_want_to_disable/ where _some_string_that_uniquely_identifes_the_job_I_want_to_disable is some string that uniquely identifies the job that you want to disable.

Last edited by Scott; 10-02-2009 at 05:07 PM..
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #802
Difficulty: Medium
The CSS @font-face rule is not supported across the main browsers, Internet Explorer, Firefox, Opera, Chrome, and Safari.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to disable cron emails, but only for logrotate only not for other logs?

Guys, is there a script or command? how to disable cron emails, but only for logrotate only not for other logs (3 Replies)
Discussion started by: kenshinhimura
3 Replies

2. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. Shell Programming and Scripting

Commented cron job -- cron monitoring

Hi I have a requirement to write a shell script,that will check the all commented job in cron job.Please help !! (2 Replies)
Discussion started by: netdbaind
2 Replies

4. Solaris

Cron job running even after cron is removed

Hi , I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility ) I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies

5. Shell Programming and Scripting

CRON Job

Hi all, Pretty new to CRON but have been messing with Ubuntu for a while now Here is the situation/problem I have run into you. I currently run a very basic back procedure by executing a daily CRON job which copies all data from one directory to a USB drive & date stamps the copy:- cp... (2 Replies)
Discussion started by: 2scoops
2 Replies

6. Shell Programming and Scripting

Auto enable/disable cron job

Hi all, Does anyone know if it is possible to enable/disable a cron job within a script? I currently have a cron job which runs every minute but now it seems that sometimes I would like to turn this job off if a condition is met. I would then like to re-enable the job at a later date. ... (5 Replies)
Discussion started by: pxy2d1
5 Replies

7. Solaris

cron job starts new cron proccess

I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies

8. UNIX for Dummies Questions & Answers

disable cron job

hi i got to shut down my server for the new year day. i am required to disable all cronjob temporarily. what is the command to do so? after start up the server will the cron job run itself automatically or i gotta restart all again? (8 Replies)
Discussion started by: legato
8 Replies

9. UNIX for Dummies Questions & Answers

CRON usage for CRON job

can anybody explain the usage of CRON for adding a cron job. please provide an example also for better understanding !!! Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies

Featured Tech Videos