- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Blond moment -- crontab question (easy 10 pts)
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
тАО06-09-2004 01:52 AM
тАО06-09-2004 01:52 AM
crontab -l [username]
crontab -e [username]
crontab -r [username]
Believe it or not, we still have some old HPUX 10x boxes here. My problem is that we can't seem to get the same syntax listed above to work on the 10x systems.
I don't remember it being different on them. Which one of us is wrong, me or the system?
How do I get what I am looking for on the old 10x systems?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 01:56 AM
тАО06-09-2004 01:56 AM
Re: Blond moment -- crontab question (easy 10 pts)
I don't have any 10.x boxes here. I checked my email archive and my predecessor's and saw no notes indicating a change in cron behavior. I have some scripts that existed in our 10.20 days and they use those specific commands to provide documentation and reports.
Either they didn't work, or my predecessors documentation had bad dates in it.
I think it should work.
Maybe files are missing in /var/adm/cron
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
тАО06-09-2004 01:56 AM
тАО06-09-2004 01:56 AM
SolutionSame here on a 10.20 server. I've checked the man page and that doesn't say anything about running it for another user.
Have you tried:
su - username -c crontab -l?
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 02:01 AM
тАО06-09-2004 02:01 AM
Re: Blond moment -- crontab question (easy 10 pts)
Have you checked the allow and deny files to make sure these users are even able to access cron?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 02:02 AM
тАО06-09-2004 02:02 AM
Re: Blond moment -- crontab question (easy 10 pts)
From the 10.2 crontab man page on docs.hp.com
/Quote
NAME
crontab - user job file scheduler
SYNOPSIS
crontab [file]
crontab -e
crontab -l
crontab -r
DESCRIPTION
The crontab command manages a crontab file for the user. You can use a crontab file to schedule jobs that are executed automatically by cron (see cron(1M) ) on a regular basis. The command has four forms:
crontab [file]
Create or replace your crontab file by copying the specified file, or standard input if file is omitted or - is specified as file , into the crontab directory, /var/spool/cron/crontabs. The name of your crontab file in the crontab directory is the same as your effective user name.
crontab -e Edit a copy of your crontab file, or create an empty file to edit if the crontab file does not exist. When editing is complete, the file will be copied into the crontab directory as your crontab file.
crontab -l List your crontab file.
crontab -r Remove your crontab file from the crontab directory.
/EndQuote
Note that *user* is not listed in the syntax.
So apparently it was not available in 10.2
And here's the page from the 11.0 page
/Quote
NAME
crontab - user job file scheduler
SYNOPSIS
crontab [file]
crontab -e [username]
crontab -l [username]
crontab -r [username]
DESCRIPTION
The crontab command manages a crontab file for the user. You can use a crontab file to schedule jobs that are executed automatically by cron (see cron(1M) ) on a regular basis. The command has four forms:
crontab [file]
Create or replace your crontab file by copying the specified file, or standard input if file is omitted or - is specified as file , into the crontab directory, /var/spool/cron/crontabs. The name of your crontab file in the crontab directory is the same as your effective user name.
crontab -e [username]
Edit a copy of the user's crontab file, or create an empty file to edit if the crontab file does not exist. When editing is complete, the file will be copied into the crontab directory as the user's crontab file.
crontab -l [username]
Lists the user's crontab file.
crontab -r [username]
Remove the user's crontab file from the crontab directory.
Only a privileged user can use username following the -e, -l, or -r options, to edit, list, or remove the crontab file of the specified user
/EndQuote
So it appears to me that the functionality first appeared in 11.0.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 02:08 AM
тАО06-09-2004 02:08 AM
Re: Blond moment -- crontab question (easy 10 pts)
Syntax is the same on 10.20.
It is obvious to consult the information in /var/spool/cron/crontabs/
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 02:15 AM
тАО06-09-2004 02:15 AM
Re: Blond moment -- crontab question (easy 10 pts)
su USERNAME -c "crontab -l"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 02:21 AM
тАО06-09-2004 02:21 AM
Re: Blond moment -- crontab question (easy 10 pts)
crontab in HP-UX 10.20 doesn't accept an user name after options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2004 02:35 AM
тАО06-09-2004 02:35 AM
Re: Blond moment -- crontab question (easy 10 pts)
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
тАО06-09-2004 03:32 AM
тАО06-09-2004 03:32 AM
Re: Blond moment -- crontab question (easy 10 pts)
SEP,
Looks like you and I suffer from the same 'should work' syndrome. I guess that we have both gotten so used to seeing it recently that it just did not click. At least I am in good company on that one.
Pete,
I see that I misled you as well. For that, I apologize. It was not an issue of users not being able to access their own crontab, it was more of looking for things that are running on a box that is currently ailing.
Jeff,
Thanks for the details. I read that online, but it did not click in my head that the [username] option was not listed. I saw the [file] and the mind went numb from there. Like I said, blond moment. As you can probably tell, I was not sitting at the keyboard, just attempting to brainstorm with the one that was.
(Nice salad. Did I miss that? I really should visit more often, huh?)
Thanks to all that chimed in. It looks like the entire situation is so far degraded that the man in charge is going to try to load from a bootable tape (if he can remember the syntax to point it to the correct path to make it work).
Have a great day!