Operating System - HP-UX
1752815 Members
5954 Online
108789 Solutions
New Discussion юеВ

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 4
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