Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Cron job does not want to stop

SOLVED
Go to solution
take2mir
Advisor

Cron job does not want to stop

Hi experts,
I really need your help. I had created cron job as below

#UTILIZATION CAPTURE
0 * * * * /usr/bin/sh /utilization/script

with this script

#!/bin/sh
sar -u 10 12 >> /utilization/sp2bm03cpu.txt
(date && vmstat) >> /utilization/sp2bm03mem.txt

However when I delete this cron job, it still keep producing the sp2bm03cpu.txt and xp2bm03mem.txt files. How should I do to make it stop?

TQ
4 REPLIES
Highlighted
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Cron job does not want to stop

How are you deleteing the cron job? If you simply edit the files under /var/spool, you have done nothing because you have not changed cron's in memory paramters. The correct procedure is:
crontab -l > mycronfile
Next edit mycronfile and remove the desired entry. Finally, "crontab < mycronfile" which not only alters the files under /var/spool but also sends a SIGHUP to the cron daemon that tells it to reread its configuration files.
If it ain't broke, I can fix that.
take2mir
Advisor

Re: Cron job does not want to stop

Yeah, right.. Thank you
take2mir
Advisor

Re: Cron job does not want to stop

I got my answer here :-)
Dennis Handly
Acclaimed Contributor

Re: Cron job does not want to stop

>Clay: also sends a SIGHUP to the cron daemon that tells it to reread its configuration files.

No SIGHUPs here. It puts a message in the cron FIFO: /var/adm/cron/FIFO