stopping cron temporarly for weekend maintenance


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users stopping cron temporarly for weekend maintenance
# 1  
Old 03-31-2004
stopping cron temporarly for weekend maintenance

I need to do some DB maintenance, but there are cron jobs running all weekend.

How do I stop the cron jobs (that I see when I do a crontab -l) for the weekend then restart the cron jobs.

My understanding is that when the system is startted cron jobs in the /usr/spool/cron/crontabs folder are automatically queud up.

How do I pause these jobs?

How do I restart them after I'm done?
# 2  
Old 03-31-2004
You could save your crontab:
crontab -l > crontab.save
more crontab.save

After you're sure you saved a copy, delete your crontab:
crontab -r

Later, you can:
crontab < crontab.save
crontab -l
to restore things.
# 3  
Old 03-31-2004
Could you not stop the cron daemon (crond) and then restart it after the maintenance is complete?

Change to whatever dir your crond is in (on my Linux box, /etc/rc.d/crond) and then run
Code:
./crond stop

as root. This would, however, stop cron jobs for ALL users.

When the work is done, a
Code:
./crond start

should get it up again.

Cheers,
ZB
http://www.zazzybob.com
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Stopping cron job

Hi, I have scheduled one job in crontab. I want to stop the job automatically after some time of its execution without killing it. Could i archive the above? (8 Replies)
Discussion started by: mehulleo
8 Replies

2. Linux

power off during weekend

Hello, I would like to turn off (mean no energy consumption) some servers during the weekend. I would like to do it automatically so i thought to create macro commands to a shell client.The problem is that giving shutdown (shutdown -h now) the server(Sun X4200 M2) turn off but the fans are still... (5 Replies)
Discussion started by: @dagio
5 Replies

3. Shell Programming and Scripting

Stopping Cron Mail to administrator

I have written a number of shell scripts which I have added to cron to run on an Apple Xserve running MAc OS Server 10.4.11. Recently I configured postfix to use one of my company's email servers as a relay so that it can send out statistics about the number of jobs my shell scripts have... (2 Replies)
Discussion started by: buzzs4w
2 Replies

4. What is on Your Mind?

what are you doing this weekend?

does someone have any plans? (7 Replies)
Discussion started by: yarx
7 Replies
Login or Register to Ask a Question