- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Easter Date?
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
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
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-24-2006 07:44 AM
тАО02-24-2006 07:44 AM
We always schedule maintenance over the Easter Sunday weekend. Is there a method to automatically calculate this date? I just can't seem to find any relationship between the date from year to year.
TIA,
Ryan
Solved! Go to Solution.
- Tags:
- date arithmetic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 07:47 AM
тАО02-24-2006 07:47 AM
Re: Easter Date?
magnetic field strength unit is named) devised an algoritm. I wrote a shell script based on his algorithm many years ago. I may be able to find it but I know there are Perl modules for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 07:49 AM
тАО02-24-2006 07:49 AM
Re: Easter Date?
http://search.cpan.org/search?query=Easter&mode=all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 07:58 AM
тАО02-24-2006 07:58 AM
SolutionThis will compute the date for you:
# cat ./easter
#!/usr/bin/perl
use strict;
use Date::Calc qw(Easter_Sunday);
my ($year,$month,$day) = Easter_Sunday($ARGV[0]);
print "Easter is $month/$day/$year\n";
Run as:
# ./easter 2006
Easter is 4/16/2006
...or pass any year to it.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 08:03 AM
тАО02-24-2006 08:03 AM
Re: Easter Date?
By the way, the computation of Easter's date can be done according to the algorithm presented here, if you really want to do so:
http://aa.usno.navy.mil/faq/docs/easter.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 08:16 AM
тАО02-24-2006 08:16 AM
Re: Easter Date?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 08:23 AM
тАО02-24-2006 08:23 AM
Re: Easter Date?
Thanks very much for the quick answers. I will probably use A. Clay's script only because my Perl skills are so limited.
Thanks,
Ryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2006 08:39 PM
тАО02-24-2006 08:39 PM
Re: Easter Date?
Then you would just check the year against the end of the table, giving an error when it needs to be updated, or giving the date when it is there.
It would be as much code, much less error prone and readily tweakable for future special cases
Just a thought...
Hein.
http://aa.usno.navy.mil/faq/docs/easter.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 07:14 AM
тАО03-02-2006 07:14 AM
Re: Easter Date?
As a follow up to this question, I would like to send out a notification on the two Mondays before the Easter weekend. How could I make a cron entry which would do this?
TIA,
Ryan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2006 07:25 AM
тАО03-02-2006 07:25 AM
Re: Easter Date?
You could cron something like this:
0 8 3,10 4 1 mailx -s "Easter is April 16" root < /dev/null
Look at the manpages for 'crontab(1)'. The line above generates a mail to "root" with the message "Easter is April 16" on April 3 and April 10 (Mondays) at 0800.
Add that line to your root crontab or create a root crontab with 'vi'.
I like to do:
# crontab -l > /tmp/mycrontab
[ edit ]
# crontab /tmp/mycrontab
Regards!
...JRF...