- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- stop cron temporarily.
Operating System - HP-UX
1824725
Members
3736
Online
109674
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО02-17-2003 04:02 PM
тАО02-17-2003 04:02 PM
stop cron temporarily.
Hi:
We use filesets(SD-UX) for Application installations. we have a requirement to stop an application process (bmq) when we install that particular applicaion filesets. However there is cron job which runs every 5 minutes which would see if that particular Appln. process is running and if not it would restart that process. Now we have do some work on the machine periodically for which we need that appln. process to be stopped for sometime. How would we handle the cron job(which would restart the process after 5 minutes) for this. Is there a way that we can stop that particular cron job temporarily? Please advise.
Thanks
Joe.
We use filesets(SD-UX) for Application installations. we have a requirement to stop an application process (bmq) when we install that particular applicaion filesets. However there is cron job which runs every 5 minutes which would see if that particular Appln. process is running and if not it would restart that process. Now we have do some work on the machine periodically for which we need that appln. process to be stopped for sometime. How would we handle the cron job(which would restart the process after 5 minutes) for this. Is there a way that we can stop that particular cron job temporarily? Please advise.
Thanks
Joe.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 04:05 PM
тАО02-17-2003 04:05 PM
Re: stop cron temporarily.
as root:
# crontab -l >/tmp/wrk
# vi /tmp/wrk
comment out the line in question that runs the script with a '#' without the quotes
Save the file
:wq!
Submit the crontab file
# crontab /tmp/wrk
When your finished, do the same thing again, this time removing the comment marker.
# crontab -l >/tmp/wrk
# vi /tmp/wrk
comment out the line in question that runs the script with a '#' without the quotes
Save the file
:wq!
Submit the crontab file
# crontab /tmp/wrk
When your finished, do the same thing again, this time removing the comment marker.
Anyone for a Mutiny ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 04:08 PM
тАО02-17-2003 04:08 PM
Re: stop cron temporarily.
Hi Joe,
You can edit the crontab entry by crontab -e.
Put a # before the line starting the apps to comment it. Once you installation is over, your remove this comment.
Srini.
You can edit the crontab entry by crontab -e.
Put a # before the line starting the apps to comment it. Once you installation is over, your remove this comment.
Srini.
Be on top.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-17-2003 04:15 PM
тАО02-17-2003 04:15 PM
Re: stop cron temporarily.
My standard way of doing this is to let the cronjobs go ahead and run but each reads a config file (very similar to the /etc/rc.config.d standard for /sbin/rcN.d scripts. Typically, if a configuration value is set to 0 the cron script simply exits with a zero status.
If all you need is a quick and dirty, you can do a crontab -l > myfile, edit myfile and remove the entry, and then crontab < myfile to reconfigure cron. An even simpler method is to simply put an 'exit 0' statement before any other commands in your cron script.
If all you need is a quick and dirty, you can do a crontab -l > myfile, edit myfile and remove the entry, and then crontab < myfile to reconfigure cron. An even simpler method is to simply put an 'exit 0' statement before any other commands in your cron script.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP