Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
12-08-2008, 12:09 AM
|
#1
|
|
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,089
Rep:
|
Monthly job
In our system , there are some batch job will only be run at the last day of each month , but the last day is different ( eg. 31th for Jan , 28th or 29th for Feb , 31th for Mar ) depends on the month, could advsie how can I check if it is the last day of the month ? can advise how to write the script ?
|
|
|
|
12-08-2008, 12:43 AM
|
#2
|
|
Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep: 
|
|
|
|
|
12-08-2008, 07:24 AM
|
#3
|
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
|
|
|
|
12-08-2008, 09:36 AM
|
#4
|
|
Member
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134
Rep:
|
First you ll hav to define wat is d end day for each month. (not for all months. there are only 4 types of end dates).
if you treat months as 1,2...,12 then set the end date also by considering the year (if it is a leap year or not).
this is only one way.
I think writing a script for that is not tedious. If you hav to run a particular application on the end date, use scheduling package like crontab.
thanx
|
|
|
|
12-09-2008, 07:59 AM
|
#5
|
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Define "at the last day of each month" -- specifically when on the last day of the month, specifically before or after the end of the business day.
What is your batch job going to do?
I suspect that for most purposes, just after midnight (i.e. early on the 1st of the next month) is as good as just before midnight.
Please answer.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:07 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|