- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to configure crontab in HP-UX
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
тАО03-18-2009 03:38 AM
тАО03-18-2009 03:38 AM
I have worked crontab in linux.
How to configure crontab in HP-UX.
I have follwoing questions
1) how to start / stop
2) how to create / edit / remove crontab of user and root. is it same as linux?
3) where the files "cron.allow and cron.deny" available?
4) where the cron files are stored. like "/var/spool/cron/crontab/root" am i correct?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 03:42 AM
тАО03-18-2009 03:42 AM
SolutionThe simplest way to answer your own questions is to consult the manpages for 'crontab' and 'cron':
http://docs.hp.com/en/B2355-60130/crontab.1.html
http://docs.hp.com/en/B2355-60130/cron.1M.html
A little self research goes an amazingly long way.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 03:50 AM
тАО03-18-2009 03:50 AM
Re: how to configure crontab in HP-UX
_________________________ 1. Minute - Minutes after the hour (0-59)
|
| ______________________ 2. Hour - 24-hour format (0-23).
| |
| | ___________________ 3. Day - Day of the month (1-31)
| | |
| | | ________________ 4. Month - Month of the year (1-12)
| | | |
| | | | ______________5. Weekday - Day of the week. (0-6, where 0 indicates Sunday)
| | | | |
30 0,12 * * * /some/script/or/command
start and stop cron:
/sbin/init.d/cron stop
/sbin/init.d/cron start
cron permission files location :
/var/adm/cron folder
users cron file location:
yes, you are right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 03:50 AM
тАО03-18-2009 03:50 AM
Re: how to configure crontab in HP-UX
/etc/init.d/cron start
enable cron at /etc/rc.config.d/cron
2) crontab -e , its same as linux
3) /var/adm/cron/cron.allow and deny
4)yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 04:14 AM
тАО03-18-2009 04:14 AM
Re: how to configure crontab in HP-UX
1.how to start / stop
/sbin/init.d/cron stop
/sbin/init.d/cron start
2.how to create / edit / remove crontab of user and root. is it same as linux?
Yes same as linux crontab -l, crontab -e
3.where the files "cron.allow and cron.deny" available?
under /var/adm/cron/
4.where the cron files are stored. like "/var/spool/cron/crontab/root" am i correct?
You are 100% Correct :-)
Regards
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 04:18 AM
тАО03-18-2009 04:18 AM
Re: how to configure crontab in HP-UX
I also go with JRF. There are plenty of informations available on man pages. If you go through man pages you will understand everything yourself.
>>I have worked crontab in linux.<<
Not much difference in HP-UX. mostly same.
1) how to start / stop
/sbin/init.d/cron stop
/sbin/init.d/cron start
2) how to create / edit / remove crontab of user and root. is it same as linux?
#crontab -e /-r
3) where the files "cron.allow and cron.deny" available?
in /var/adm/cron directory.
4) where the cron files are stored. like "/var/spool/cron/crontab/root" am i correct?
/var/spool/cron/crontabs --> here every cron user will have their own cron files
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 04:30 AM
тАО03-18-2009 04:30 AM
Re: how to configure crontab in HP-UX
man crontab
1) Daemon is /sbin/init.d/cron
2) /var/spool the contrab files exist. crontab -l to list crontat -e to edit. The crontab command takes care of file locations.
3) See http://docs.hp.com for more
4) Yes
Syntax is NOT the same as Linux. There are tricks Linux does which go beyond what cron can do under HP-UX. In this case Unix is more standard. Linux extended the RFC
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
тАО03-18-2009 05:25 AM
тАО03-18-2009 05:25 AM
Re: how to configure crontab in HP-UX
while that works, I prefer:
crontab -l > some.file
vi some.file
crontab some.file
as all it takes to make your life miserable is a few fat-fingered keystrokes when doing the "crontab -e" method to wipe the file.
Whatever you do, *do NOT* edit the files found in "/var/spool/cron/crontab/" directly...if you save changes there, cron won't re-read the file and "see" them.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2009 06:43 AM
тАО03-18-2009 06:43 AM
Re: how to configure crontab in HP-UX
eg:
crontab -e
* * * * * /tmp/avi.sh > /tmp/avi.log
If the /tmp/avi.sh fails, you could view the same in /var/adm/cron/log file where rc>0
To find more , you could analyse the logs /tmp/avi.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 09:40 AM
тАО08-21-2009 09:40 AM
Re: how to configure crontab in HP-UX
*/3 * * * * /path/to/script
Thank you,
--Dennis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 09:51 AM
тАО08-21-2009 09:51 AM
Re: how to configure crontab in HP-UX
you'd need 3,6,9,12 and so forth
the method you illustrated is, I believe a GNU / Linux extension.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 10:12 AM
тАО08-21-2009 10:12 AM
Re: how to configure crontab in HP-UX
Thanks for the info.
--Dennis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2009 05:17 PM
тАО08-21-2009 05:17 PM
Re: how to configure crontab in HP-UX
You typically don't have to do this. It is started when the machine boots.
What you do is edit your crontab entries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-22-2009 08:01 PM
тАО08-22-2009 08:01 PM
Re: how to configure crontab in HP-UX
Check the below links:
http://www.cyberciti.biz/faq/hp-ux-unix-cron-job-configuration-tutorial/
http://nixdoc.net/man-pages/HP-UX/cron.1m.html
Rgds-Kranti