- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to make crontabs permanent?
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
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
тАО02-12-2004 04:15 AM
тАО02-12-2004 04:15 AM
Yesterday we rebooted them and the new crontab entry is gone though the old one remains.
How do I make it stick through a reboot?
Ron
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2004 04:42 AM
тАО02-12-2004 04:42 AM
SolutionIt would appear there is a problem with your system or a start of script puts back the old crontabs.
I would check the cron startup script in /etc/init.d and anything else thats custom.
After making your changes on the file, try changing the permissions on the actual crontab file(deep in /var/spool/cron) to read only.
Then boot and see what happens.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2004 05:17 AM
тАО02-12-2004 05:17 AM
Re: How to make crontabs permanent?
Just a thought: could be cfengine if you use it...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2004 06:48 AM
тАО02-12-2004 06:48 AM
Re: How to make crontabs permanent?
Although I would hope the data was actually written out to the disk after 2 weeks, was it a clean reboot?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2004 09:31 AM
тАО02-12-2004 09:31 AM
Re: How to make crontabs permanent?
I found the culprit. Stephen, I think you must have meant inittab as there was no init.d. I followed it to rc.M which calls a file which calls a binary and the binary sets the time for the first line of the crontab so I assume they just erase the old and make a new. I have no source code for the binary. Just a little config file that I can edit to set the time and a few other variables. The machine's whole purpose in life is to run the binary so I can't tell it not to run.
I guess I will just put the command in root's crontab which I am sure the binary doesn't mess with. I don't think it matters who runs the script.
Ron
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2004 02:24 PM
тАО02-12-2004 02:24 PM
Re: How to make crontabs permanent?
The reference to 'rc.M' sounds like an old Slackware distribution though.. much fun ;)
In any case, if it's going to thrash your cron jobs every reboot, use one of the other methods.
Depending on the version of 'crond' you're using (vixie cron vxxx, I'm not sure which do and don't support the following, check the man page).
1) Use /etc/crontab . This lives outside of the /var/spool/cron/ structures, and has the ability to launch a given command as a different user (6th field).
2) use /etc/cron.d/
3) (not dependant on crond version): Just export, add jobs, re-import dynamically.. i.e.:
( crontab -l ; echo "0/5 * * * * /usr/bin/yourjob" ) > /tmp/file; crontab -e < /tmp/file
.. Just some thoughts ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2004 06:44 PM
тАО02-12-2004 06:44 PM
Re: How to make crontabs permanent?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2004 02:06 AM
тАО02-13-2004 02:06 AM
Re: How to make crontabs permanent?
You are correct that it is an old Slackware distribution. Thanks for the script and the explanation for why Stephan thought it should be init.d. If using root's crontab causes a problem or doesn't work then I will try it.
Raqu,
The binary is a proprietary special purpose program only used by my company. Its name is rscmngr and it was written I think by Hughes Software Systems in India. I suppose if we really made a stink they might be able to dig up the source code but the boxes are going to be replaced this year as soon as we get out of Chapter 11 so it's not worth the effort.
Ron