- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- stopping cron
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 02:11 PM
тАО08-15-2000 02:11 PM
stopping cron
Just stopping cron using the init script won't work, as it respawns. Should I move the crontabs?
Suggestions - or am I going about this wrong?
- Tags:
- cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 02:13 PM
тАО08-15-2000 02:13 PM
Re: stopping cron
Issue a kill command for the PID. (Avoid kill -9).
To restart, can issue the /usr/sbin/cron command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 02:21 PM
тАО08-15-2000 02:21 PM
Re: stopping cron
I had been using /sbin/init.d/cron stop|start ... this just issues the self-same kill to the cron PID.
I need another way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 03:26 PM
тАО08-15-2000 03:26 PM
Re: stopping cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 03:52 PM
тАО08-15-2000 03:52 PM
Re: stopping cron
The best way to go is probably take it out of inittab and then you can simply do
/sbin/init.d/cron stop
/sbin/init.d/cron start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 06:18 PM
тАО08-15-2000 06:18 PM
Re: stopping cron
Stop the cron issuing
/sbin/init.d/cron stop
and there is no chance of respawning of cron once again.
Once ur work is done, restart the cron by
/sbin/init.d/cron start.
I have done this atleast thousand times, so I assure u to go ahead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2000 10:33 PM
тАО08-15-2000 10:33 PM
Re: stopping cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 03:27 AM
тАО08-16-2000 03:27 AM
Re: stopping cron
#./sbin/init.d/stop cron
Do your Job
#./sbin/init.d/start cron
Go Ahead it`s really very safe and right way.
Rgds
Jaikishan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 03:31 AM
тАО08-16-2000 03:31 AM
Re: stopping cron
You can always move what you find in
/var/spool/cron/crontabs to somewhere else, and put all back after you backup has finished
No?
Just a suggestion...
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 08:01 AM
тАО08-16-2000 08:01 AM
Re: stopping cron
I think the last suggestion of moving crontab is maybe the best.
philc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 08:04 AM
тАО08-16-2000 08:04 AM
Re: stopping cron
Anthony Goonetilleke is right. In a standard machine you do not have cron (and I see not reason to have it in inittab). But, to try to debug it, would you like to post the inittab line about cron?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 08:04 AM
тАО08-16-2000 08:04 AM
Re: stopping cron
Any chance on checking the script that is called from inittab?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 08:20 AM
тАО08-16-2000 08:20 AM
Re: stopping cron
# grep cron /etc/inittab
cchk:234:respawn:/usr/bin/sh /home/bvb/croncheck.sh > /tmp/croncheck.log 2>&1
Here is the script:
# more croncheck.sh
#!/bin/sh
# croncheck.sh: by XXXXXXXXXXXXXXX, put in place on 3/29/00
# Special purpose script, designed to check/restart /usr/sbin/cron only.
# Designed to be run from /etc/init; inittab entry might look like:
# cchk:234:respawn:/usr/bin/sh /home/bvb/croncheck.sh > /tmp/croncheck.log 2>&1
while true
do
ps -ef | grep -v grep | grep /usr/sbin/cron >/dev/null
if [ $? -ne 0 ]
then
echo "$0: `date` /usr/sbin/cron not running, restarting now"
echo "$0: `date` /usr/sbin/cron not running, restarting now" | mail root
/usr/sbin/cron &
fi
sleep 120 # check every five minutes
done
I agree that I would need to move all user crontabs (there really should only be root and oraprod on these systems).
There's no mystery about the initab script or HOW it works, just why. I'm told by manager that there may have been an issue on 1 (or 4) systems with cron dying, but no one is sure.
philc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 08:25 AM
тАО08-16-2000 08:25 AM
Re: stopping cron
Do the syslogs indicate anything? cron should not be dying out. The entry in the inittab is not really necessary if you know why the cron is dying.
There are reasons for having the inittab entry but this seems like more of a workaround that the true solution. And it seems that it is preventing you from doing your original task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2000 08:37 AM
тАО08-16-2000 08:37 AM
Re: stopping cron
The script has been implemented in 99. Check for cron patches.
e.g. for HP-UX 11.0 I do have installed PHCO_17553 Y2K cummulative cron.
Go under forum/individual patches and check for cron patches. You may find even newer released. Read the description and if you do not have the patches installed, installed them. The script might be just the work around before the patch....