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
09-16-2006 03:49 PM
09-16-2006 03:49 PM
cron
I need to enter one entry in cron where it will reboot the server on First and Third thursday of every month. Can anyone suggest on this.
Thanks in advance.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2006 04:31 PM
09-16-2006 04:31 PM
Re: cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2006 04:34 PM
09-16-2006 04:34 PM
Re: cron
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2006 04:42 PM
09-16-2006 04:42 PM
Re: cron
For Ex:
15 4 * * 4 /usr/sbin/shutdown -ry 0 >/dev/null 2>&1
Which will reboot server Every Thursday at 4:15am
see more details at
http://docs.hp.com/en/B2355-60127/crontab.1.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2006 04:46 PM
09-16-2006 04:46 PM
Re: cron
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=371092
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2006 05:00 PM
09-16-2006 05:00 PM
Re: cron
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2006 12:40 PM
09-17-2006 12:40 PM
Re: cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2006 02:16 PM
09-17-2006 02:16 PM
Re: cron
Schedule this to run every Thursday:
#!/usr/bin/sh
DATE=$(date +u"%d")
TH1=$(cal | awk '{if ($5 != "Th" && $5 != "") print $5}' | head -1)
TH3=$(cal | awk '{if ($5 != "Th" && $5 != "") print $5}' | head -3 | tail -1)
if [ "${DATE}x" = "${TH1}x" -o "${DATE}x" = "${TH3}x" ]
then
shutdown -r -y now
fi
exit
A sample crontab entry (which runs every Thursday at 1:00am):
0 1 * * 4 reboot-1st-3rd-th.sh
PCS