- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron issue
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
тАО08-18-2010 09:58 PM
тАО08-18-2010 09:58 PM
cron issue
cat samplecron
0,10,20,30,40,50 * * * * /usr/bin/bdf >> /tmp/bdf.log
i can get the output but my problem is
if i schedule new cron job and i execute crontab filename ,, previous running cron job get removed.
how can i preserve the previous running cron jobs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:04 PM
тАО08-18-2010 10:04 PM
Re: cron issue
Easiest way:
$ crontab -l >oldcron.txt
$ cat oldcron.txt newcron.txt | crontab -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:15 PM
тАО08-18-2010 10:15 PM
Re: cron issue
Your crontab entry must contain ALL of your jobs. If you want to add more, you can use "crontab -e".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:18 PM
тАО08-18-2010 10:18 PM
Re: cron issue
How did you enter new cron jab ?
crontab -e ??
You mean after save the crontab, you cannot see your previous job anymore inside cron with the command:
# crontab -l ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:33 PM
тАО08-18-2010 10:33 PM
Re: cron issue
when i created first cron job i used vi samplecron
then i executed crontab firstcronjob
for adding second cron job for the same user again i used vi editor and i executed
crontab secondcronjob
after that i listed jobs with crontab -l ,, firstcronjob was missing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:43 PM
тАО08-18-2010 10:43 PM
Re: cron issue
That's what Hakki suspected. You can't do that. You must put ALL of your user's crontab entries in one "logical" file. The one you pass to crontab(1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:44 PM
тАО08-18-2010 10:44 PM
Re: cron issue
Is that anything like a _problem_?
> [...] and i executed
> crontab secondcronjob
man crontab
Not knowing your HP-UX version, I can't quote
the exact text, but I'd guess that it says
something like:
Create or replace your crontab file by
copying the specified file, [...]
Nothing there about "appending the specified
file".
> crontab -e ??
You might consider using that option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:54 PM
тАО08-18-2010 10:54 PM
Re: cron issue
i have to use crontab -e and add the second job.
after that do i need to execute
crontab secondjob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 10:58 PM
тАО08-18-2010 10:58 PM
Re: cron issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2010 11:25 PM
тАО08-18-2010 11:25 PM
Re: cron issue
No, you keep using "crontab -e". Or you can use "crontab -l" and put that in a file and resubmit that file with your changes.
>can I have an example for particular user having one job already and to add another cron job.
Use "crontab -e" to edit your existing crontab entry. Then add as many as you want.
Note: One problem with "crontab -e" is that you don't have a backup if your disks crash and it isn't in a source management system.
So you could just start with a file and just add to it, then use "crontab file" each time.