- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Daylight Savings Time Email
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
03-08-2004 09:03 AM
03-08-2004 09:03 AM
I'm positive that I have seen a similar posting but I can't find it using search. I want to notify a list of users when the next time change will occur. I know the next time change in the US occurs on April 4th but I want an automatic method that would trigger whenever the time change is less than 14 days away. I want to run a cron every weekday and send emails to a list of users indicating when the time will change. The list will be handled by an alias so that part is easy.
I've looked at tztab but that looks like a lot of trouble to interpret. I know somebody wrote a script to do this!!
Thanks,
Bob
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2004 09:09 AM
03-08-2004 09:09 AM
Re: Daylight Savings Time Email
if [ `date +%d` -lt 31 ]
then
whatever
fi
Best regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2004 09:17 AM
03-08-2004 09:17 AM
Re: Daylight Savings Time Email
Thanks,
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2004 09:28 AM
03-08-2004 09:28 AM
SolutionLet your cron script run every Mon-Fri and then add this logic (and make sure that PATH is set and exported):
TYPESET -i10 DAYS_LEFT=$(dst.pl -d -e)
if [[ ${DAYS_LEFT} -lt 14 ]]
then
echo "Time will change in ${DAYS_LEFT} days" > tmpfile
echo "Other Stuff you might want" >> tmpfile
dst.pl -n >> tmpfile # displays actual transition time/date
cat tmpfile | mail user1 user2
rm tmpfile
fi
You should add a better tmpfile name and note that Daylight Savings Time is tied to a particular TZ setting. If your environment spans multiple timezones then you need to take that into account.
e.g.
DAYS_LEFT=$(TZ=CST6CDT dst.pl -d -e)
that will set TZ to CST6CDT for just this command.
Here's the Perl script. Invoke as dst.pl -u for full usage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2004 09:35 AM
03-08-2004 09:35 AM
Re: Daylight Savings Time Email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2004 09:38 AM
03-08-2004 09:38 AM
Re: Daylight Savings Time Email
No points here thanks.
Best regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2004 10:05 AM
03-08-2004 10:05 AM
Re: Daylight Savings Time Email
Bob