- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Editing the cronjobs
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
06-10-2014 05:33 AM - edited 06-10-2014 05:42 AM
06-10-2014 05:33 AM - edited 06-10-2014 05:42 AM
Editing the cronjobs
Hello Everyone,
Can anyone please tell me how can I make some entries in cron if I have to make some process automated.
Like I want that the nickel script should run daily or on weekly basis and a script containing some imp commands like
ioscan, bdf. cmviewcl, etc should run daily in the morning and evening.
Please suggest how can I do it and where I have to edit.
I don't want ready made script as I have to learn how to do it I want the procedure or anything related to it in a basic form.
Since I am new to hpux I want to know about unix.
Please also guide me in any way possible.
Regards,
Mehul
- Tags:
- crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2014 10:01 AM
06-10-2014 10:01 AM
Re: Editing the cronjobs
To edit a crontab file you use 'crontab -e'. This will open your crontab file in the 'vi' editor.
From there you add entrires in the following format:
<min> <hr> <monthday> <month> <day of week> <command to run>
The explanation of each field from the 'crontab' man page (remember that man pages are your friend):
The entries in a crontab file are lines of six fields each. The fields are separated by spaces or tabs. The lines have the following format: minute hour monthday month weekday command The first five are integer patterns that specify when the sixth field, command, should be executed. They can have the following ranges of values: minute The minute of the hour, 0-59 hour The hour of the day, 0-23 monthday The day of the month, 1-31 month The month of the year, 1-12 weekday The day of the week, 0-6, 0=Sunday Each pattern can be either an asterisk (*), meaning all legal values, or a list of elements separated by commas. An element is either a number in the ranges shown above, or two numbers in the range separated by a hyphen (meaning an inclusive range). Note that the specification of days can be made in two fields: monthday and weekday. If both are specified in an entry, they are cumulative.
For example, if you want to run a script called "dosomething" that is in the /do/it/now directory at 3:15 AM every Wednesday morning you crontab would like like:
15 3 * * 3 /do/it/now/dosomething
Read through the crontab man page for more explanations.
# man crontab