Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just want to pause everyhthing. DOn't execute crontab -l.

share|improve this question

4 Answers

up vote 8 down vote accepted

crontab -e then comment out each line you don't want to run with #.

share|improve this answer
oof...... this is the best solution the *nix community made over the years? – NewAlexandria Oct 20 '12 at 14:08

First, back up the crontab:

crontab -l > my_cron_backup.txt

Then you can empty it:

crontab -r

To restore:

crontab my_cron_backup.txt
crontab -l
share|improve this answer

Do you have root access? Just pause cron

sudo /etc/init.d/crond stop

Then restart it when you're ready

sudo /etc/init.d/crond start
share|improve this answer
That is assuming you want to stop crontab for all users including root. The selected answer, and kubanskamac's answer would do it for just the current (desired?) user. – Kevin K Dec 15 '09 at 0:20

If you are using vi as editor, then just enter :%s/^/#/ in command mode. In all lines (%), it substitutes (s///) the begin of line (^) with a hash (#).

share|improve this answer
If you are not using vi as default editor, you can "force" usage of vi like EDITOR=vi; crontab -e, and than you can use the trick above. – Betlista Jan 25 at 11:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.