- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- query about crontab
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
Forums
Discussions
Discussions
Discussions
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
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
05-29-2003 08:52 PM
05-29-2003 08:52 PM
query about crontab
How do i schedule any jobs in cron??
Any answere will be appreciable.
Regards,
Rajesh G.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 09:01 PM
05-29-2003 09:01 PM
Re: query about crontab
Minute hour monthday Month weekday job
e.g.
15 1 * * 0 /usr/local/bin/fred
Runs a program called 'fred' at 1:15AM every sunday morning.
See this document
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B9106-90008/B9106-90008_top.html&con=/hpux/onlinedocs/B9106-90008/00/00/70-con.html&toc=/hpux/onlinedocs/B9106-90008/00/00/70-toc.html&searchterms=cron&queryid=20030529-225932
Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 09:04 PM
05-29-2003 09:04 PM
Re: query about crontab
Use # crontab -e, make your entries and save.
If its a user other than root, ensure that they have cron access through editing /var/adm/cron.allow. Then as that user simply use crontab -e.
For info on specific fields in cron, see man cron.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 09:04 PM
05-29-2003 09:04 PM
Re: query about crontab
If you consider this simple cron script:
#*******************************************************************************
# min|hour |day |month|day |script |Logging Error and Output
# | |of mo| |of wk| |
#----|-----|-----|-----|-----|-----------------------------|---------------------
00 03 * * * /prod/allscripts/myscript.sh 1>/prod/allscripts/logfiles/output.log 1>/prod/allscripts/logfiles/error.log
#*******************************************************************************
# END OF TABLE day0->Sunday day6->Saturday
#*******************************************************************************
where the script i want to schedule is: /prod/allscripts/myscript.sh
and the output generated during execution is: /prod/allscripts/logfiles/output.log
and the error generated during execution is: /prod/allscripts/logfiles/error.log
you can schedule is either by:
1. editing the crontab table directly:
crontab -e
2. Loading the script from a file
crontab mycron.crn
For more information, do:
man cron
man crontab
if you any further queries, please revert.
hope this helps!
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 09:05 PM
05-29-2003 09:05 PM
Re: query about crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 09:08 PM
05-29-2003 09:08 PM
Re: query about crontab
also
to view the current crontab, do
crontab -l
I have attached the sample crontab as an example. Make sure that you make necessary modifications to /var/adm/cron/cron.allow (the List of allowed users)
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2003 11:28 PM
05-29-2003 11:28 PM
Re: query about crontab
editing the crontab is usefull for scheduling jobs at regular intervals.
IF you weant to schedule job you can also use the
"at" command.
at -f /mysfiles.sh now
schedule a job for now,
at -l
showw jobs scheduled for start.
In the directory /var/spool/cron/ ypu can find the files where is stored the information for later start.
man at will give you much more infos.
HTH,
Massimo