- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to create cron script 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
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
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
02-20-2020 03:40 AM
02-20-2020 03:40 AM
How to create cron script in HP-UX
Hi All,
As per management decision, we keep only one month audit log in HP-UX (version: 11.31) system.
So we delete/move log more than month. It need's to create cron script in HP-UX 11.31.
Please assit to create cron scipt for above purpose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2020 01:19 AM
02-22-2020 01:19 AM
Re: How to create cron script in HP-UX
Hello Ashraf1,
Easy to remember crontab file format:
* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)
MIN HOUR DATE MONTH DAY /PATH-TO-COMMAND
Method to trim the log files -
- Turn off auditing:
# audsys -f
- Backup the log files audfile1 and audfile2 to another filesystem, or archive them in case they are needed.
- Zero out the files:
# > audfile1
# > audfile2
- Restart the auditing subsystem to use the files and put limits on their size:
# audsys -n -c audfile1 -s 5000 -x audfile2 -z 2000
- Run the audsys command to verify that the auditing system is active again:
# audsys
you can put these steps into a script and put it into the cron
Hope this helps !