LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Monthly job (https://www.linuxquestions.org/questions/linux-newbie-8/monthly-job-689037/)

ust 12-08-2008 12:09 AM

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 ?

billymayday 12-08-2008 12:43 AM

Searching is easy

http://www.linuxquestions.org/questi...-month-662702/

archtoad6 12-08-2008 07:24 AM

Why? See my post there.

matrix13 12-08-2008 09:36 AM

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

archtoad6 12-09-2008 07:59 AM

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.


All times are GMT -5. The time now is 06:56 PM.